summaryrefslogtreecommitdiffstats
path: root/vim/ftplugin
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2017-10-20 01:38:42 -0400
committerJesse Luehrs <doy@tozt.net>2017-10-20 03:50:24 -0400
commit68e0bd7d36fadff5919fd426629df6ee00baf22a (patch)
tree770b918604ad3a95ee600fffcd2515fbb8912e00 /vim/ftplugin
parent41413ffceab7fc9969c4d1fa77e2f44ac5b86a76 (diff)
downloadconf-68e0bd7d36fadff5919fd426629df6ee00baf22a.tar.gz
conf-68e0bd7d36fadff5919fd426629df6ee00baf22a.zip
remove some vim config that i don't use anymore
Diffstat (limited to 'vim/ftplugin')
-rw-r--r--vim/ftplugin/lua.vim11
-rw-r--r--vim/ftplugin/markdown.vim1
-rw-r--r--vim/ftplugin/perl.vim71
-rw-r--r--vim/ftplugin/rust.vim2
-rw-r--r--vim/ftplugin/scala.vim1
5 files changed, 1 insertions, 85 deletions
diff --git a/vim/ftplugin/lua.vim b/vim/ftplugin/lua.vim
deleted file mode 100644
index fc0d0fc..0000000
--- a/vim/ftplugin/lua.vim
+++ /dev/null
@@ -1,11 +0,0 @@
-" :make does a syntax check
-setlocal makeprg=luac\ -p\ %
-setlocal errorformat=luac:\ %f:%l:\ %m
-
-" set commentstring
-setlocal commentstring=--%s
-
-" treat require lines as include lines (for tab completion, etc)
-setlocal include=\\s*require\\s*
-setlocal includeexpr=substitute(v:fname,'\\.','/','g').'.lua'
-exe "setlocal path=" . system("lua -e 'local fpath = \"\" for path in package.path:gmatch(\"[^;]*\") do if path:match(\"\?\.lua$\") then fpath = fpath .. path:gsub(\"\?\.lua$\", \"\") .. \",\" end end print(fpath:gsub(\",,\", \",.,\"):sub(0, -2))'")
diff --git a/vim/ftplugin/markdown.vim b/vim/ftplugin/markdown.vim
deleted file mode 100644
index f30a884..0000000
--- a/vim/ftplugin/markdown.vim
+++ /dev/null
@@ -1 +0,0 @@
-set tw=78
diff --git a/vim/ftplugin/perl.vim b/vim/ftplugin/perl.vim
index 60bafd3..94f3c1d 100644
--- a/vim/ftplugin/perl.vim
+++ b/vim/ftplugin/perl.vim
@@ -17,10 +17,6 @@ endfunction
nmap <buffer> <silent>K :call Help(0, [':'], '<SID>perldoc')<CR>
vmap <buffer> <silent>K :call Help(1, [':'], '<SID>perldoc')<CR>
-nmap <buffer> <silent>gf :exe v:count . 'find ' . substitute(expand('<cfile>'), '::', '/', 'g') . '.pm'<CR>
-" XXX: <cfile> is wrong here, need to do something like i do for Help
-"vmap <buffer> <silent>gf :exe v:count . 'find ' . substitute(expand('<cfile>'), '::', '/', 'g') . '.pm'<CR>
-
function! s:unpostfix()
let postop_pattern = '\<\(if\|unless\|while\|until\|for\)\>'
let indent = repeat(' ', &sw)
@@ -42,71 +38,4 @@ function! s:unpostfix()
" call setline('.', line)
exe 's/\(\s*\)\(.*\) ' . postop_pattern . ' \(.*\);/\1\3 (\4) {\r\1' . indent . '\2;\r\1}/'
endfunction
-
map <buffer> <silent> <Leader>i :call <SID>unpostfix()<CR>
-
-if 0
-" reimplement :make, since it always prints to the screen, which is annoying
-function! Make()
- if exists('#QuickFixCmdPre')
- doau QuickFixCmdPre make
- endif
-
- cexpr ""
-
- let buffer_contents = join(getbufline("", 1, '$'), "\n")
- let output = system("perl -c -Ilib", buffer_contents)
- let lines = split(output, "\n")
-
- for line in lines
- let match = matchlist(line, '\(.\+\) at - line \(\d\+\)')
- if !empty(match)
- caddexpr expand('%') . ':' . match[2] . ':' . match[1]
- endif
- endfor
-
- if exists('#QuickFixCmdPost')
- doau QuickFixCmdPost make
- endif
-endfunction
-
-function! HighlightCurrent()
- exe '1wincmd w'
- try
- syntax clear CompileError
- catch /E28/
- endtry
- let qlist = getqflist()
- for q in qlist
- let line = substitute(getline(q['lnum']), '\', '\\\\', 'g')
- exe 'syntax match CompileError /^\%' . q['lnum'] . 'l' . line . '$/'
- endfor
- highlight CompileError ctermbg=red guibg=red
-endfunction
-
-let b:needs_clear = 0
-function! UpdateStatusLine()
- let qlist = getqflist()
- let lnum = getpos('.')[1]
- for q in qlist
- if lnum == q["lnum"]
- let text = q["text"]
- let width = &columns - 52
- if strlen(text) > width - 3
- let text = strpart(text, 0, width - 3) . '...'
- endif
- echo text
- let b:needs_clear = 1
- return
- endif
- endfor
- if b:needs_clear
- echo ""
- let b:needs_clear = 0
- endif
-endfunction
-
-au BufEnter,BufWritePost <buffer> call Make()
-au QuickFixCmdPost <buffer> call HighlightCurrent()
-au CursorMoved <buffer> call UpdateStatusLine()
-endif
diff --git a/vim/ftplugin/rust.vim b/vim/ftplugin/rust.vim
index 11a75d7..03d90d4 100644
--- a/vim/ftplugin/rust.vim
+++ b/vim/ftplugin/rust.vim
@@ -1,5 +1,5 @@
if filereadable("Cargo.toml")
- compiler cargo
+ compiler cargo
setlocal makeprg=cargo\ build
else
setlocal makeprg=rustc\ %
diff --git a/vim/ftplugin/scala.vim b/vim/ftplugin/scala.vim
deleted file mode 100644
index 7b8e826..0000000
--- a/vim/ftplugin/scala.vim
+++ /dev/null
@@ -1 +0,0 @@
-call unite#custom#profile('with_dir', 'context', {'input' : '^src/ '})