forked from yuriyvolkov/pingvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.vim
More file actions
89 lines (67 loc) · 1.67 KB
/
Copy pathcustom.vim
File metadata and controls
89 lines (67 loc) · 1.67 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
"****************************
" My VIM customizations
"****************************
"Don't update the display while executing macros
set lazyredraw
"Railscasts autumn color scheme
colorscheme railscasts-autumn
"Remove visual bell
set vb t_vb=
set novisualbell
"enable omnicompletion
set ofu=syntaxcomplete#Complete
set completeopt=menu,menuone,preview
"avoid backups stuff
set backup
set backupdir=~/.vim//backup//
set directory=~/.vim//tmp//
"share clipboard
set clipboard+=unnamed
"add ack magic (currently not working on mac...)
set grepprg=ack-grep
"editor UI fine tuning
set cursorline
set noerrorbells
set whichwrap=b,s,<,>,~,[,]
set number
set ruler
set guioptions-=T
"CTAGS
set tags=~/code/tags
"NERDTree customizations
let NERDTreeChDirMode=2
"edit vimrc
nmap <silent> <leader>ev :e $MYVIMRC<CR>
"reload vim config
nmap <silent> <leader>sv :source ~/.vimrc<CR>
"custom mappings
nnoremap <silent> <Leader>p :NERDTreeToggle<CR>
nnoremap <leader>t :TlistToggle<CR>
nnoremap <c-s> :w<CR>
inoremap <c-s> <Esc>:w<CR>
cmap :W<CR> :w<CR>
vnoremap <Tab> >>
vnoremap <s-Tab> <<
"switching between tabs
map <c-tab> :tabnext<cr>
map <c-s-tab> :tabprevious<cr>
imap <c-tab> <esc>:tabnext<cr>
imap <c-s-tab> <esc>:tabprevious<cr>
"CommandT switch
nnoremap <silent> <leader>t :CommandT<CR>
"Load OS dependent customizations
if has("mac")
source ~/.vim/custom-mac.vim
elseif has("unix")
source ~/.vim/custom-linux.vim
endif
"write as su
command! SudoW w !sudo tee % >/dev/null
"visual select most recently edited text
nmap gV `[v`]
"Add some files to the ignore list
set wildignore+=*.class,.git/**,.svn/**,target/**
"Set fullscreen
if has("gui_running")
set lines=999 columns=999
endif