summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.vimrc9
1 files changed, 9 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index a332d7c..fde8f0f 100644
--- a/.vimrc
+++ b/.vimrc
@@ -6,6 +6,7 @@ set ttimeout " time out for key codes
set ttimeoutlen=100 " wait up to 100ms after Esc for special key
set display=truncate " show @@@ in the last line if it is truncated
set scrolloff=5 " show a few lines around the cursor
+set number
set relativenumber " relative line numbering
set tabstop=4 " 4-space tabs
set softtabstop=4 " 4-space tabs
@@ -13,6 +14,7 @@ set shiftwidth=4 " 4-space shiftwidth
set backspace=indent,eol,start " backspace over everything in insert
set directory=$HOME/.vim/swapfiles// " common swap directory
set fillchars+=vert:\
+set showtabline=2 " always show tab bar
syntax enable " switch syntax highlighting on, used to be syntax on
" Matching and key mappings
@@ -27,6 +29,9 @@ augroup END
" only do this if autocommands enabled
if has("autocmd")
+ autocmd InsertEnter * :set norelativenumber
+ autocmd InsertLeave * :set relativenumber
+
" enable file type detection and load indent files
filetype plugin indent on
@@ -66,6 +71,10 @@ inoremap <silent><expr> <TAB>
\ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
+" in normal mode tab key cycles through tabs
+nnoremap <Tab> :tabnext<CR>
+nnoremap <S-Tab> :tabprev<CR>
+
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'