summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-07-23 12:02:17 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-07-23 12:02:17 +0400
commit5a50591ea023f63649569638d45bf0f3bec0aef6 (patch)
tree5ebf381008c3b7c51cbc025c98faa25b6323e2aa
parentc419b97b5cc61127ca2b7f9839a588c2ee3e7353 (diff)
Minimal vimrc added
-rw-r--r--config/vim/vimrc35
1 files changed, 35 insertions, 0 deletions
diff --git a/config/vim/vimrc b/config/vim/vimrc
new file mode 100644
index 0000000..cfb9931
--- /dev/null
+++ b/config/vim/vimrc
@@ -0,0 +1,35 @@
+" Suleyman's minimal vim config with no plugin support
+
+let mapleader = " "
+set number
+set scrolloff=5 " Smooth scroll
+set clipboard=unnamedplus " Use system clipboard
+set shortmess+=I " Deactivate intro text
+set fillchars=eob:\ " Remove "~" for empty lines (must end wit trailing a space)
+autocmd BufwritePost * %s/\s\+$//e " Remove useless trailing spaces when saving
+autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o " Disable autocomments
+
+" Different cursor shapes for insert and normal modes
+let &t_SI = "\e[6 q"
+let &t_EI = "\e[2 q"
+set ttimeout
+set ttimeoutlen=1
+set ttyfast
+
+" Normal mode maps
+map <leader><leader> :w!<CR>
+map <leader>q :wqa!<CR>
+map <C-t> :tabnew<CR>
+map <C-w> :tabclose!<CR>
+map J :tabn <CR>
+map K :tabp <CR>
+
+" Insert mode maps
+inoremap <C-h> <Left>
+inoremap <C-l> <Right>
+inoremap <C-j> <C-o>gj
+inoremap <C-k> <C-o>gk
+inoremap <C-o> <C-o>o
+
+set background=dark
+colorscheme lunaperche