-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
66 lines (47 loc) · 1.23 KB
/
.vimrc
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
" Plugins are configured using Vim8 plugins in the .vim-folder
set nocompatible
filetype off
" Default to not read-only in vimdiff
set noro
filetype plugin indent on
" Plugin configuration
let g:highlightedyank_highlight_duration = 500 " Persist highlighting in vim-highlightedyank
nmap cx <Plug>(ExchangeLine)
set autoread
let mapleader=" "
nnoremap <silent> <leader> :WhichKey '<Space>'<CR>
" By default timeoutlen is 1000 ms
set timeoutlen=500
syntax on
set expandtab
set shiftwidth=4
set tabstop=4
set autoindent
set smartindent
" set relativenumber
set ignorecase
set number
" Vim easymotion
nmap <leader>/ <Plug>(easymotion-s2)
" Start searching before pressing enter
set incsearch
" Set j and k to move visual lines (not underlying lines)
nmap j gj
nmap k gk
"keep visual mode after indent
vnoremap > >gv
vnoremap < <gv
nnoremap <C-n> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
:set clipboard=unnamedplus " Works only if :echo has('clipboard') returns 1
" Allow undos and history to be persistant
set undofile
set undolevels=1000
set history=1000
" keep cursor in the middle of the screen when scrolling
set so=10
" Allow using uppercase W and Q commands to save/quit
command WQ wq
command Wq wq
command W w
command Q q