diff options
author | Jesse Luehrs <doy@stripe.com> | 2017-10-26 13:21:58 -0700 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-10-26 13:30:57 -0700 |
commit | 91f504a95b6159f1ccaeadf5fefe2dc0e9a3bce7 (patch) | |
tree | 5933a8de2184b27ed31c03403da995b48ebf3863 | |
parent | b80511162738f3f50c551a788208461078c2ff8a (diff) | |
download | conf-91f504a95b6159f1ccaeadf5fefe2dc0e9a3bce7.tar.gz conf-91f504a95b6159f1ccaeadf5fefe2dc0e9a3bce7.zip |
make tab at the start of lines indent again
-rw-r--r-- | vimrc | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -578,7 +578,7 @@ inoremap <expr> ' strpart(getline('.'), col('.')-1, 1) == "\'" ? "\<Right>" inoremap <expr> " strpart(getline('.'), col('.')-1, 1) == "\"" ? "\<Right>" : "\"\"\<Left>" " }}} " tab for completion {{{ -inoremap <Tab> <C-n> +inoremap <expr> <Tab> strpart(getline('.'), 0, col('.')-1) =~ '^\s*$' ? "\<Tab>" : "\<C-n>" inoremap <S-Tab> <C-p> " }}} " Miscellaneous {{{ @@ -637,22 +637,21 @@ endif let g:neosnippet#snippets_directory = '~/.vim/snippets' let g:neosnippet#disable_runtime_snippets = { '_' : 1 } -let i_tab = maparg("<Tab>", "i") -let i_stab = maparg("<S-Tab>", "i") -let s_tab = maparg("<Tab>", "s") -" XXX *surely* this eval isn't actually necessary +let i_tab = maparg("<Tab>", "i", 0, 1) +let i_stab = maparg("<S-Tab>", "i", 0, 1) +let s_tab = maparg("<Tab>", "s", 0, 1) imap <expr><Tab> \ neosnippet#expandable_or_jumpable() ? \ "\<Plug>(neosnippet_expand_or_jump)" : - \ eval('"\' . i_tab . '"') + \ i_tab["expr"] ? eval(i_tab["rhs"]) : eval("\"\\" . i_tab["rhs"] . "\"") imap <expr><S-Tab> \ neosnippet#expandable_or_jumpable() ? \ "\<Plug>(neosnippet_expand_or_jump)" : - \ eval('"\' . i_stab . '"') + \ i_stab["expr"] ? eval(i_stab["rhs"]) : eval("\"\\" . i_stab["rhs"] . "\"") smap <expr><Tab> \ neosnippet#expandable_or_jumpable() ? \ "\<Plug>(neosnippet_expand_or_jump)" : - \ eval('"\' . s_tab . '"') + \ s_tab["expr"] ? eval(s_tab["rhs"]) : eval("\"\\" . s_tab["rhs"] . "\"") " }}} " perl " puppet |