Repository navigation
Expand file tree
/
Copy pathvimrc
More file actions
156 lines (147 loc) · 3.66 KB
/
Copy pathvimrc
File metadata and controls
156 lines (147 loc) · 3.66 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
version 6.0
if &cp | set nocp | endif
let s:cpo_save=&cpo
set cpo&vim
map! <S-Insert> <MiddleMouse>
map <S-Insert> <MiddleMouse>
let &cpo=s:cpo_save
unlet s:cpo_save
let g:pydiction_location = '~/.vim/after/ftplugin/complete-dict'
if has("gui_running")
highlight SpellBad term=underline gui=undercurl guisp=palegreen
if has("gui_gtk2")
set guifont=DejaVu\ Sans\ Mono\ 9
endif
endif
" infect with pathogen
filetype off
set nocp
runtime bundle/pathogen/autoload/pathogen.vim
set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vimcurrent,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
"colors xoria256
colors molokai
map <c-j> <c-w>j
map <c-k> <c-w>k
map <c-l> <c-w>l
map <c-h> <c-w>h
let mapleader = ","
noremap <F1> <ESC>
" Toggle line numbering
nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR>
" toggle NERDTree
nnoremap <F3> :NERDTreeToggle<cr>
" find current file in NERDTree
nnoremap <F4> :NERDTreeFind<cr>
" toggle Gundo
nnoremap <F5> :GundoToggle<cr>
" run Pep8
let g:pep8_map='<F6>'
nnoremap <F9> :SyntasticCheck<CR>
nnoremap <F10> :Errors<CR>
"
" remove newlines
nnoremap <leader>j a<CR><Esc>k$
" switch off hilighting
nnoremap <leader><space> :noh<cr>
" reformat paragraph
nnoremap <leader>q gqip
" cleanup trailing spaces
nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
" copy to X copy buffer
nnoremap <leader>y "+y
" jump to next/prev change and center screen
nnoremap <leader>[ [czz
nnoremap <leader>] ]czz
nnoremap <c-p> :bp<cr>
nnoremap <c-n> :bn<cr>
nnoremap <c-tab> <c-w><c-w>
" close buffer without closing window
nmap ,d :b#<bar>bd#<CR>
" autowrite on focus loss
au FocusLost * :wa
" `gf` jumps to the filename under the cursor. Point at an import statement
" and jump to it!
python << EOF
import os
import sys
import vim
for p in sys.path:
if os.path.isdir(p):
vim.command(r"set path+=%s" % (p.replace(" ", r"\ ")))
EOF
let g:NERDTreeIgnore = ['\~$', '\.pyc$', '\.pyo$']
let pymode_rope_vim_completion=1
python << EOF
import sys
sys.path.append('/home/asosnin/.vim/ftplugin/python/ropevim/')
EOF
source ~/.vim/ftplugin/python/ropevim/ropevim.vim
au BufNewFile,BufRead *.tac set filetype=python
set autoindent
set backspace=indent,eol,start
if exists('+colorcolumn')
set colorcolumn=110
else
au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1)
highlight OverLength ctermbg=darkred ctermfg=white guibg=#FFD9D9
match OverLength /\%>80v.\+/
endif
if has("python") && !empty($VIRTUAL_ENV)
python << EOF
import os
import sys
a = os.environ['VIRTUAL_ENV'] + '/bin/activate_this.py'
execfile(a, dict(__file__ = a))
if 'PYTHONPATH' not in os.environ:
os.environ['PYTHONPATH'] = ''
os.environ['PYTHONPATH'] += ":"+os.getcwd()
os.environ['PYTHONPATH'] += ":".join(sys.path)
EOF
endif
set clipboard=unnamed
set encoding=utf-8
set expandtab
set fileencodings=ucs-bom,utf-8,default,latin1
set foldlevel=99
set foldmethod=indent
set formatoptions=qrn1
set guioptions=tei " no scrollbar
set guioptions-=mlLlTt "remove toolbar
set guioptions+=A
set gdefault
set helplang=en
set history=1000
set history=50
set hlsearch
set incsearch
set ignorecase
set modeline
set modelines=5
set mouse=a
set nocompatible
"set nomodeline
set number
set printoptions=paper:a4
set ruler
set scrolloff=3
set shiftwidth=4
set showcmd
set showmatch
set showmode
set smartcase
set softtabstop=4
set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
set syntax=auto
set tabstop=4
set termencoding=utf-8
set title
set ttyfast
"set visualbell " too distracting!
set wildmenu
set wildmode=list:longest
set window=51
set wrap
call pathogen#infect()
syntax on
filetype plugin indent on
" vim: set ft=vim :