summaryrefslogtreecommitdiffstats
path: root/vim/files/ftplugin
diff options
context:
space:
mode:
authoryushyin <yushyin@saga>2019-06-11 00:55:39 +0200
committeryushyin <yushyin@saga>2019-06-11 00:55:39 +0200
commit614eb79f5271b3c2a5f1c62e57dd8a5be161d76c (patch)
tree56a65b5de1bf6a1e3886d46d162250b4973e2588 /vim/files/ftplugin
downloaddotfiles-igor-614eb79f5271b3c2a5f1c62e57dd8a5be161d76c.tar.gz
dotfiles-igor-614eb79f5271b3c2a5f1c62e57dd8a5be161d76c.tar.xz
first commit
Diffstat (limited to 'vim/files/ftplugin')
-rw-r--r--vim/files/ftplugin/c.vim16
-rw-r--r--vim/files/ftplugin/haskell.vim2
-rw-r--r--vim/files/ftplugin/tex.vim5
3 files changed, 23 insertions, 0 deletions
diff --git a/vim/files/ftplugin/c.vim b/vim/files/ftplugin/c.vim
new file mode 100644
index 0000000..f08009e
--- /dev/null
+++ b/vim/files/ftplugin/c.vim
@@ -0,0 +1,16 @@
+setl cin cino+=:0,(s,l1
+if has('cscope')
+ if filereadable("cscope.out")
+ cs add cscope.out
+ endif
+ nnoremap [cscope] <Nop>
+ nmap <C-\> [cscope]
+ nmap [cscope]s :cs find s <C-R>=expand("<cword>")<CR><CR>
+ nmap [cscope]g :cs find g <C-R>=expand("<cword>")<CR><CR>
+ nmap [cscope]c :cs find c <C-R>=expand("<cword>")<CR><CR>
+ nmap [cscope]t :cs find t <C-R>=expand("<cword>")<CR><CR>
+ nmap [cscope]e :cs find e <C-R>=expand("<cword>")<CR><CR>
+ nmap [cscope]f :cs find f <C-R>=expand("<cfile>")<CR><CR>
+ nmap [cscope]i :cs find i ^<C-R>=expand("<cfile>")<CR>$<CR>
+ nmap [cscope]d :cs find d <C-R>=expand("<cword>")<CR><CR>
+endif
diff --git a/vim/files/ftplugin/haskell.vim b/vim/files/ftplugin/haskell.vim
new file mode 100644
index 0000000..23a4130
--- /dev/null
+++ b/vim/files/ftplugin/haskell.vim
@@ -0,0 +1,2 @@
+setl tags+=codex.tags
+setl ts=8 sts=4 sw=4 et sr
diff --git a/vim/files/ftplugin/tex.vim b/vim/files/ftplugin/tex.vim
new file mode 100644
index 0000000..72097c4
--- /dev/null
+++ b/vim/files/ftplugin/tex.vim
@@ -0,0 +1,5 @@
+setl lbr
+nnoremap <expr> j v:count ? 'j' : 'gj'
+vnoremap <expr> j v:count ? 'j' : 'gj'
+nnoremap <expr> k v:count ? 'k' : 'gk'
+vnoremap <expr> k v:count ? 'k' : 'gk'