-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
73 lines (52 loc) · 1.17 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
execute pathogen#infect()
syntax on
filetype plugin indent on
set tabstop=4
set softtabstop=4
set shiftwidth=4
set ignorecase
set smartcase
set number
set showcmd
set cursorline
set wildmenu
set lazyredraw
set showmatch
set incsearch
set hlsearch
nnoremap <leader><space> :nohlresearch<CR>
set foldenable
set foldlevelstart=10
set foldnestmax=10
noremap <space> za
set foldmethod=indent
set whichwrap+=h,l
noremap j gj
noremap k gk
noremap B ^
noremap E $
nnoremap <Right> <C-w>l
nnoremap <Left> <C-w>h
nnoremap <Up> <C-w>k
nnoremap <Down> <C-w>j
nnoremap <A-w> <C-w>
nnoremap gV `[v`]
let mapleader=","
nnoremap <leader>u :GundoToggle<CR>
" allow sudo save of a file
cmap w!! w !sudo tee > /dev/null %
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_structs = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
" swap files
" swap files (.swp) in a common location
" // means use the file's full path
set dir=~/.vim/_swap//
" backup files (~) in a common location if possible
set backup
set backupdir=~/.vim/_backup/,~/tmp,.
" turn on undo files, put them in a common location
set undofile
set undodir=~/.vim/_undo/