blob: a7d1c0c6f583976fa0e10aa4438f4183b895ce90 (
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
37
38
39
40
41
42
43
44
|
let mapleader = " "
set background=dark
set clipboard=unnamedplus " Use system clipboard
" set list " Show spaces, tabs, etc.
set number
set relativenumber
set shortmess+=I " Deactivate intro text
set nowrap " Disable wrapping
set fillchars=eob:\ " Remove "~" for empty lines (`eob:\` must end with a trailing space)
autocmd BufwritePost * %s/\s\+$//e " Remove trailing spaces when saving
" Disable autocomments
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
" 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
" Tabs
nnoremap <silent> <C-t> :tabnew<CR>
nnoremap <silent> J :tabn<CR>
nnoremap <silent> K :tabp<CR>
" Windows
nnoremap <silent> <C-Down> :split<CR>
nnoremap <silent> <C-Right> :vsplit<CR>
nnoremap <C-h> <C-w>h
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
" Imitate normal mode in insert mode
inoremap <C-h> <Left>
inoremap <C-j> <Down>
inoremap <C-k> <Up>
inoremap <C-l> <Right>
inoremap <C-Space> <Esc>
" Other
nnoremap <silent> <leader><leader> :w!<CR>
nnoremap <silent> <leader>q :wqa!<CR>
|