-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.vimrc
57 lines (43 loc) · 1.14 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
execute pathogen#infect()
filetype on
filetype plugin on
"NERDTree shortcuts
nmap <C-I> :NERDTreeToggle<CR>
let NERDTreeShowHidden=1
let g:NERDTreeDirArrows=0
"Tab controls
nmap <C-t> :tabnew<CR>
nmap <C-f> :tabnext<CR>
nmap <C-b> :tabprev<CR>
"Pane navigation
nmap <C-h> <C-W><C-H>
nmap <C-l> <C-W><C-L>
nmap <C-j> <C-W><C-J>
nmap <C-k> <C-W><C-K>
"Pane resizing
nmap <S-h> :vertical resize -2<CR>
nmap <S-l> :vertical resize +2<CR>
nmap <S-j> :resize -2<CR>
nmap <S-k> :resize +2<CR>
"Inserting blank lines using enter
nmap <S-Enter> o<Esc>
nmap <CR> O<Esc>
"Quoting words
nnoremap qw :silent! normal "zyiW<Esc>:let @z="'".@z."'"<CR>cW<c-r>z<Esc>b
nnoremap qd :silent! normal "zyiW<Esc>:let @z="\"".@z."\""<CR>cW<c-r>z<Esc>b
":O command for open in new tab
command -nargs=1 -complete=file O tabnew <args>
"Unmap record
nmap q <Nop>
"lcd to current buffer pwd, useful for running commands
autocmd BufEnter * lcd %:p:h
"Syntax highlighting
syntax on
"Line numbers on
set number
"Indentation control
set softtabstop=2 shiftwidth=2 expandtab
autocmd FileType make setlocal noexpandtab
set backspace=indent,eol,start
set iskeyword-=_
set laststatus=2