-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
178 lines (151 loc) · 4.86 KB
/
Copy path.vimrc
File metadata and controls
178 lines (151 loc) · 4.86 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
set nocompatible
call pathogen#infect()
"inoremap <Nul> <C-x><C-n>
set autoindent
set autowrite
set background=dark
set backspace=indent,eol,start
set backupdir=~/.vim/sessions
set clipboard+=unnamed
set commentstring=" \ #\ %s"
set dir=~/.vim/sessions
set encoding=utf8
set expandtab
set foldlevel=0
set hidden
set history=1000
set hlsearch
set incsearch
set ls=2
set mouse=a
set nospell
set nu
set ruler
set shiftround
set shiftwidth=4
set showmatch
set showmode
set smartcase
set smartindent
set smarttab
set softtabstop=4
set spelllang=de
set tabstop=4
set textwidth=0
set title
set titlestring=%F
set undolevels=1000
set wildignore=*.pyc,*.o,*.class,*.swp,*.bak,*.png,*.jpeg,*.jpg
set wildmenu
set wildmode=longest:list,full
syntax on
filetype plugin indent on
autocmd Filetype html set ts=2 sts=2 sw=2
autocmd Filetype javascript set ts=2 sts=2 sw=2
autocmd Filetype jinja set ts=2 sts=2 sw=2
autocmd Filetype htmljinja set ts=2 sts=2 sw=2
autocmd Filetype scala set ts=2 sts=2 sw=2
autocmd Filetype jade set ts=2 sts=2 sw=2
autocmd Filetype pug set ts=2 sts=2 sw=2
autocmd Filetype ruby set ts=2 sts=2 sw=2
autocmd Filetype python set ts=4 sts=4 sw=4
autocmd Filetype logstash set ts=4 sts=4 sw=4
autocmd Filetype nix set ts=2 sts=2 sw=2
autocmd Filetype elm set ts=4 sts=4 sw=4
colorscheme solarized8
au BufRead,BufNewFile *.md set filetype=markdown
au BufRead,BufNewFile *.mdown set filetype=markdown
au BufRead,BufNewFile *.markdown set filetype=markdown
au BufRead,BufNewFile *.gradle set filetype=groovy
au BufRead,BufNewFile *.j2* set filetype=htmljinja
au BufRead,BufNewFile *.html.j2 set filetype=htmljinja
au BufRead,BufNewFile *.j2.html set filetype=htmljinja
au BufRead,BufNewFile *.j2.jade set filetype=pug
au BufRead,BufNewFile *.j2.pug set filetype=pug
au BufRead,BufNewFile *.sbt set filetype=scala
au BufRead,BufNewFile *.nix set filetype=nix
au BufRead,BufNewFile *.robot set filetype=robot
au BufRead,BufNewFile *.js.es6 set filetype=javascript
autocmd! BufRead,BufNewFile *.ics setfiletype icalendar
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
"let g:syntastic_python_checker_args = '--rcfile=~/coding/python/pylintrc-pydev'
"let g:syntastic_python_checker_args = '--ignore=E501'
"
let g:syntastic_elm_checkers = ['elm_make']
let mapleader=","
set pastetoggle=<C-T><C-T>
map <C-P><C-P> :set number mouse=a <CR>
map <C-P><C-O> :set nonumber mouse-=a <CR>
map <C-P><C-D> "=strftime("%d.%m.%Y")<CR>P
map <C-T><C-A> :set filetype=ansible <CR>
map <C-T><C-H> :set filetype=htmljinja <CR>
map <C-T><C-I> :set filetype=jinja <CR>
map <C-T><C-K> :set filetype=coffee <CR>
map <C-T><C-P> :set filetype=python <CR>
map <C-T><C-J> :set filetype=pug <CR>
map <C-T><C-M> :set filetype=markdown <CR>
map <C-T><C-Y> :set filetype=yaml <CR>
map <C-T><C-N> :set filetype=nix <CR>
map <F10> :w <CR> :make <CR>
map <F3> :NERDTreeToggle<CR>
map <leader>d <Plug>Kwbd<CR>
map <C-A> "_ddP
map <C-F><C-F> :%s/\| {%/-/g\|:%s/%}//g<CR>
map <F7> :Ack <CR>
nmap gt :bn<CR>
nmap gT :bp<CR>
nmap g0 :bfirst<CR>
nmap g$ :blast<CR>
" Quickly edit/reload the vimrc file
nmap <silent> <leader>ev :e $MYVIMRC<CR>
nmap <silent> <leader>sv :so $MYVIMRC<CR>
nmap <silent> <leader>/ :nohlsearch<CR>
" diff mode
" move to previous change
:nnoremap <expr> <C-u> &diff ? '[c' : '<C-u>'
" move to next change
:nnoremap <expr> <C-i> &diff ? ']c' : '<C-i>'
" NERDTree
" let the NERDTree ignore some file type (generated stuff and the like)
let NERDTreeIgnore=['\.vim$', '\~$', '\.gen.js$', '\.map$', '\.pyc$']
let NERDTreeMinimalUI = 1
"Jedi
let g:jedi#popup_on_dot = 0
"Unite
let g:unite_source_grep_command = 'ag'
let g:unite_source_grep_default_opts =
\ '-i --vimgrep --hidden --ignore ' .
\ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'''
let g:unite_source_grep_recursive_opt = ''
let g:unite_source_history_yank_enable = 1
let g:unite_winheight = 50
nmap <space> [unite]
nnoremap [unite]/ :Unite -no-split -auto-preview grep:.<cr>
nnoremap [unite]y :Unite -no-split history/yank<cr>
nnoremap [unite]s :Unite -no-split -start-insert buffer<cr>
nnoremap [unite]f :Unite -no-split file_rec -start-insert<cr>
nnoremap [unite]u :Unite
nnoremap [unite]o :Unite -no-split -start-insert -auto-preview outline<cr>
nnoremap [unite]m :Unite -no-split -start-insert file_mru<cr>
"vim-pandoc
let g:pandoc#folding#fdc = 0
let g:pandoc#spell#enabled = 0
let g:pandoc#filetypes#pandoc_markdown = 0
"pandoc commands
:command -nargs=+ Pd %!pandoc --wrap=preserve <args> -
"neocomplete
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#disable_auto_complete = 1
imap <expr><C-Space> neocomplete#start_manual_complete()
imap <C-@> <C-Space>
"nimrod.vim
fun! JumpToDef()
if exists("*GotoDefinition_" . &filetype)
call GotoDefinition_{&filetype}()
else
exe "norm! \<C-]>"
endif
endf
" Jump to tag
nn <M-g> :call JumpToDef()<cr>
ino <M-g> <esc>:call JumpToDef()<cr>i