summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-08-20 19:17:51 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-08-20 19:17:51 +0400
commit6dbfd3a1da55b99bc75b35c74020b698e195204d (patch)
tree0178896544e1b01c72296ef5c049ef227ded10a8 /config
parenta4879e1e124cecb7f287d988a4f6e8e3560b5bff (diff)
nvim config added
Diffstat (limited to 'config')
-rw-r--r--config/nvim/init.vim36
1 files changed, 36 insertions, 0 deletions
diff --git a/config/nvim/init.vim b/config/nvim/init.vim
new file mode 100644
index 0000000..54f6297
--- /dev/null
+++ b/config/nvim/init.vim
@@ -0,0 +1,36 @@
+" Suleyman's minimal vim config for servers
+" at https://git.farajli.net/slcf
+
+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)
+:set nowrap " Disable wrapping
+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