-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
75 lines (54 loc) · 1.98 KB
/
vimrc
File metadata and controls
75 lines (54 loc) · 1.98 KB
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
67
68
69
70
71
72
73
74
" Always store vim directory in ~/.vim, even on Windows
set runtimepath=$HOME/.vim,$VIMRUNTIME,$HOME/.vim/after
" Disable backwards compatibility with vi
set nocompatible
" Font
if has("win32") || has("win64")
set guifont=DejaVu_Sans_Mono:h11:cANSI
else
set guifont=Monospace\ 13
endif
" Start Pathogen
execute pathogen#infect()
" Color scheme
syntax on
source ~/.vim/enable16colors.vim
colorscheme jellybeans
" I added this because the pathogen setup told me to...
filetype plugin indent on
" Turn on search highlighting
set hlsearch
" Disable highlighting on Escape
nnoremap <silent> <esc> :noh<cr><esc>
" Turn on syntax highlighting for XAML files
filetype on
au BufNewFile,BufRead *.xaml set filetype=xml
" NERDTree Toggle button mapping
map <F4> :NERDTreeToggle <cr>
" Make backspace work as expected
set backspace=indent,eol,start
" Show line numbers
set number
" Set case insensitivity for searching/substituting
set ignorecase
" Set tabs == 4 spaces
set tabstop=4
" Use OS clipboard as default buffer
set clipboard=unnamed
" Treat long lines as break lines (useful when moving around in them)
map j gj
map k gk
" Buffers - explore/next/previous: Alt-F12, F12, Shift-F12.
nnoremap <silent> <F12> :BufExplorer<CR>
nnoremap <silent> <C-j> :bn<CR>
nnoremap <silent> <C-k> :bp<CR>
" Window navgation - move cursor up/down/left/right: Alt-Up, Down, Left, Right
nmap <silent> <A-Up> :wincmd k<CR>
nmap <silent> <A-Down> :wincmd j<CR>
nmap <silent> <A-Left> :wincmd h<CR>
nmap <silent> <A-Right> :wincmd l<CR>
" Search recursively in all files in working dir for current word under cursor
nnoremap <silent> <F9> :vimgrep /<C-R><C-W>/gj ./**/*.*<cr>:cw<cr>
" Search recursively in all files in working dir for custom word
nnoremap <C-s> :vimgrep //gj ./**/*.* \| :cw<left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left><left>
set wildignore+=.*,*\\tmp\\*,*.swp,*.zip,*.exe,*.doc,*.dll,*.db,*.pdf,*.jpg,*.gif,*.msi,*.pdb,*.png,*.docx,*.suo,*.com,*.ico