summaryrefslogtreecommitdiffstats
path: root/vimrc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-10-31 00:41:59 -0400
committerJesse Luehrs <doy@tozt.net>2017-10-31 10:30:15 -0400
commit8668898d9db43a766a9952aed4ba012171cf2a12 (patch)
tree29d885305e3c260d785e4c38fa95a236953a3302 /vimrc
parent762c306354830f4203f6429234d6786ae3e31c0a (diff)
downloadconf-8668898d9db43a766a9952aed4ba012171cf2a12.tar.gz
conf-8668898d9db43a766a9952aed4ba012171cf2a12.zip
i think this tab override is probably a bit too opinionated
not sure how it interacts with things like supertab and whatnot
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/vimrc b/vimrc
index 7249a71..4f9c315 100644
--- a/vimrc
+++ b/vimrc
@@ -32,6 +32,13 @@ autocmd vimrc CmdWinEnter * nnoremap <buffer><CR> <CR>
nnoremap <silent>H :bp<CR>
nnoremap <silent>L :bn<CR>
" }}}
+" use tab for completion {{{
+inoremap <expr> <Tab>
+ \ strpart(getline('.'), 0, col('.') - 1) =~ '\(^\\|\s\+\)$'
+ \ ? "\<Tab>"
+ \ : "\<C-n>"
+inoremap <S-Tab> <C-p>
+" }}}
" fixups for my keyboard remappings {{{
nmap <silent>) 0
nmap <silent>g) g0