Skip to content

Commit 4c2f218

Browse files
committed
Add some extra configuration for specific files.
1 parent 27a4447 commit 4c2f218

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-4
lines changed

vim/ftplugin/htmldjango.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
let b:surround_{char2nr("v")} = "{{ \r }}"
2+
let b:surround_{char2nr("{")} = "{{ \r }}"
3+
let b:surround_{char2nr("%")} = "{% \r %}"
4+
let b:surround_{char2nr("b")} = "{% block \1block name: \1 %}\r{% endblock \1\1 %}"
5+
let b:surround_{char2nr("i")} = "{% if \1condition: \1 %}\r{% endif %}"
6+
let b:surround_{char2nr("w")} = "{% with \1with: \1 %}\r{% endwith %}"
7+
let b:surround_{char2nr("f")} = "{% for \1for loop: \1 %}\r{% endfor %}"
8+
let b:surround_{char2nr("c")} = "{% comment %}\r{% endcomment %}"
9+
10+
runtime ftplugin/xhtml.vim

vim/ftplugin/java.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
" Specific configuraiton for Java files
2+
setlocal omnifunc=javacomplete#Complete

vim/ftplugin/markdown.vim

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,19 @@ set formatoptions=tcroqwan2
33
set comments=n:>
44
set nocindent
55
set tw=80
6+
call textobj#sentence#init()
67

8+
let did_open_markdown = 0
9+
for arg in argv()
10+
if fnamemodify(arg, ':e') == 'markdown' ||
11+
\ fnamemodify(arg, ':e') == 'md' ||
12+
\ fnamemodify(arg, ':e') == 'mdown' ||
13+
\ fnamemodify(arg, ':e') == 'mkd' ||
14+
\ fnamemodify(arg, ':e') == 'mkdn' ||
15+
\ fnamemodify(arg, ':e') == 'mdd'
16+
let did_open_markdown = 1
17+
break
18+
endif
19+
endfor
20+
21+
unlet did_open_markdown

vim/ftplugin/python.vim

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
compiler pyunit
2-
set smartindent
3-
set cinwords=if,elif,else,for,while,try,except,finally,def,class
4-
set makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
5-
set efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
2+
setlocal smartindent
3+
setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class
4+
setlocal makeprg=python\ -c\ \"import\ py_compile,sys;\ sys.stderr=sys.stdout;\ py_compile.compile(r'%')\"
5+
setlocal efm=%C\ %.%#,%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,%Z%[%^\ ]%\\@=%m
66
setlocal foldmethod=indent
7+
setlocal omnifunc=pythoncomplete#Complete
8+
9+
nnoremap <buffer> <silent> <C-]> :call jedi#goto()<CR>
10+
" call ToggleTrailWhiteSpace(1)
711

812
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
913
" Python integration with Vim

0 commit comments

Comments
 (0)