From b7116c6a913121be7d002bc4f678fb1fd4c2f20f Mon Sep 17 00:00:00 2001 From: "Adam T. Carpenter" Date: Wed, 22 Mar 2023 23:11:26 -0400 Subject: feat: add tabs and cycling to vimrc --- .vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) 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 \ coc#refresh() inoremap pumvisible() ? "\" : "\" +" in normal mode tab key cycles through tabs +nnoremap :tabnext +nnoremap :tabprev + function! s:check_back_space() abort let col = col('.') - 1 return !col || getline('.')[col - 1] =~# '\s' -- cgit v1.2.3