-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminvimrc
44 lines (41 loc) · 1.42 KB
/
minvimrc
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=","
let g:mapleader=","
set nu rnu
set tabstop=4 " sets tab to 4 spaces
set softtabstop=4 " inserts 4 spaces instead of 1 tab
set expandtab " Use appropriate no of tabs acc to indentation
set shiftwidth=4 " useful in indentation
set splitbelow " split below not above
set noswapfile " no swap files plz
set nobackup " no backup files too
set mouse=a " use mouse in vim
set clipboard=unnamedplus " use system clipboard not just regiesters(imp)
filetype on " to detect filetypes
filetype indent on " indent based on filetype
syntax enable " looks good highlights acc to syntax
set autoindent " autoindent on
set nowrap " don't wrap plz it's ugly
set hidden " When on a buffer becomes hidden when it is abandoned
set formatoptions-=cro " get rid of stupid next line commenting
let s:undoDir = "/tmp/.undodir_" . $USER
if !isdirectory(s:undoDir)
call mkdir(s:undoDir, "", 0700)
endif
let &undodir=s:undoDir
set undofile
imap ii <esc>
nnoremap d "_d
vnoremap d "_d
nnoremap c "_c
nnoremap s "_s
vnoremap s "_s
nnoremap S "_S
vnoremap S "_S
nnoremap <Leader>s :%s/\<<C-r><C-w>\>//g<Left><Left>
nnoremap <leader>l :let @/=""<CR>
vnoremap < <gv
vnoremap > >gv
nnoremap H gT
nnoremap L gt
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv