blob: 54f6297bed109a0c2e1693049a289c7346ed46d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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
|