mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 21:54:10 +01:00
vim: use <Space> more consistently in search view
In search view <Space> will show the thead, but folding messages that don't match the current search expression. Conversly, <Enter> always shows all messages in the thread.
This commit is contained in:
parent
7a215c2de8
commit
e6628e78d9
2 changed files with 11 additions and 12 deletions
|
@ -42,7 +42,8 @@ Buffer types:
|
||||||
You are presented with the search results when you run :NotMuch.
|
You are presented with the search results when you run :NotMuch.
|
||||||
|
|
||||||
Keybindings:
|
Keybindings:
|
||||||
<Enter> - show the selected message
|
<Space> - show the selected thread colapsing unmatched items
|
||||||
|
<Enter> - show the entire selected thread
|
||||||
a - archive message (remove inbox tag)
|
a - archive message (remove inbox tag)
|
||||||
f - filter the current search terms
|
f - filter the current search terms
|
||||||
o - toggle search screen order
|
o - toggle search screen order
|
||||||
|
|
|
@ -114,7 +114,8 @@ let g:notmuch_folders_maps = {
|
||||||
|
|
||||||
" --- --- bindings for search screen {{{2
|
" --- --- bindings for search screen {{{2
|
||||||
let g:notmuch_search_maps = {
|
let g:notmuch_search_maps = {
|
||||||
\ '<Enter>': ':call <SID>NM_search_show_thread()<CR>',
|
\ '<Space>': ':call <SID>NM_search_show_thread(0)<CR>',
|
||||||
|
\ '<Enter>': ':call <SID>NM_search_show_thread(1)<CR>',
|
||||||
\ '<C-]>': ':call <SID>NM_search_expand(''<cword>'')<CR>',
|
\ '<C-]>': ':call <SID>NM_search_expand(''<cword>'')<CR>',
|
||||||
\ 'a': ':call <SID>NM_search_archive_thread()<CR>',
|
\ 'a': ':call <SID>NM_search_archive_thread()<CR>',
|
||||||
\ 'f': ':call <SID>NM_search_filter()<CR>',
|
\ 'f': ':call <SID>NM_search_filter()<CR>',
|
||||||
|
@ -266,17 +267,14 @@ endfunction
|
||||||
|
|
||||||
" --- --- search screen action functions {{{2
|
" --- --- search screen action functions {{{2
|
||||||
|
|
||||||
function! s:NM_search_show_thread()
|
function! s:NM_search_show_thread(everything)
|
||||||
let id = <SID>NM_search_thread_id()
|
let words = [ <SID>NM_search_thread_id() ]
|
||||||
if id != ''
|
if !a:everything && exists('b:nm_search_words')
|
||||||
let words = [id]
|
call extend(words, ['AND', '('])
|
||||||
if exists('b:nm_search_words')
|
call extend(words, b:nm_search_words)
|
||||||
let words = ['('] + b:nm_search_words + [')', 'AND', id]
|
call add(words, ')')
|
||||||
endif
|
|
||||||
if len(words)
|
|
||||||
call <SID>NM_cmd_show(words)
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
call <SID>NM_cmd_show(words)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:NM_search_prompt()
|
function! s:NM_search_prompt()
|
||||||
|
|
Loading…
Reference in a new issue