diff options
| author | jdhao <jdhao@hotmail.com> | 2020-10-07 23:54:36 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2020-10-07 23:54:36 +0800 |
| commit | 4e354ef185b23dc9ba26f013b5eeb3870fc2a4dc (patch) | |
| tree | 26076069013f69e6cd5789e52d76c131450a5ff9 /mappings.vim | |
| parent | cbb49028d45c4f4588141be685f27e2832e55ea8 (diff) | |
move completion-related mapping to mappings.vim
Diffstat (limited to 'mappings.vim')
| -rw-r--r-- | mappings.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mappings.vim b/mappings.vim index 2647e76..2c8bf65 100644 --- a/mappings.vim +++ b/mappings.vim @@ -106,6 +106,10 @@ inoremap <expr> <cr> ((pumvisible())?("\<C-Y>"):("\<cr>")) " Use <esc> to close auto-completion menu inoremap <expr> <esc> ((pumvisible())?("\<C-e>"):("\<esc>")) +" Tab-complete, see https://vi.stackexchange.com/q/19675/15292. +inoremap <expr> <tab> pumvisible() ? "\<c-n>" : "\<tab>" +inoremap <expr> <s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>" + " Edit and reload init.vim quickly nnoremap <silent> <leader>ev :tabnew $MYVIMRC <bar> tcd %:h<cr> nnoremap <silent> <leader>sv :silent update $MYVIMRC <bar> source $MYVIMRC <bar> |
