-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc
79 lines (58 loc) · 1.88 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
67
68
69
70
71
72
73
74
75
76
77
78
79
"Phil Rees - vim config
"Colour {{{
colorscheme Chasing_Logic "colour scheme
syntax on "enable syntax processing
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
" }}}
"Spaces & Tabs {{{
set nocompatible
set tabstop=2 "number of visual spaces per TAB char
set softtabstop=4 "number of spaces for a tab when editting
set expandtab "convert tab char to spaces
filetype on "load filetype specific indent files
filetype indent on
filetype plugin on
" }}}
"UI Layout {{{
"set file specific settings for this file only, used to fold/format
set modeline
set modelines=1
set number "shows line number
set showcmd "shows recent command in bottom bar
" }}}
"Search {{{
set wildmenu "visual autocomplete for command menu
set showmatch "highlights matching for {[(
set incsearch "search as characters are typed
set hlsearch "highlight matches
"turn off search highlighting
nnoremap <leader><space> :nohlsearch<CR>
" }}}
" Folding {{{
set foldenable "enables folding
set foldlevelstart=5 "If it is set to 0, all folds will be closed. Setting it to 99 would guarantee folds are always open. So, setting it to 10 here ensures that only very nested blocks of code are folded when opening a buffer
"can also set foldnestmax to limit the total number of folds
" }}}
"Custom Maps {{{
" move to beginning/end of line
nnoremap B ^
nnoremap E $
" highlight last inserted text
nnoremap gV `[v`]
"writes a file that requires sudo to modify
cnoremap sudow w !sudo tee % >/dev/null
"nerdtree map
map :o :NERDTree<CR>
" shorter switching between windows
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
let mapleader = ","
" }}}
execute pathogen#infect()
"folds this file by markers and sets everything to be folded by default
" vim:foldmethod=marker:foldlevel=0