diff --git a/ftplugin/java.vim b/ftplugin/java.vim deleted file mode 100644 index d46f8b0..0000000 --- a/ftplugin/java.vim +++ /dev/null @@ -1,16 +0,0 @@ -let g:JavaImpDataDir = $HOME . "/.vim/JavaImp" - -" F7 to call clean redundant Java imports and sort them -function JavaImpClean() - %!~/bin/clean_imports.sh % - :JavaImpSort -endfunction -:command JavaImpClean exec JavaImpClean() -:nnoremap :JavaImpClean - -"let makeprg = 'java -cp /opt/boxen/homebrew/opt/checkstyle/libexec/checkstyle-6.0-all.jar -c '. vimrc_git . '/checkstyle.xml %:p' -let makeprg = 'checkstyle -c '. vimrc_git . '/checkstyle.xml ./%' - -let &makeprg=escape(makeprg, ' ') -setlocal errorformat=%f:%l:\ %m,%f:%l:%v:\ %m,%-G%.%# - diff --git a/ftplugin/javascript.lua b/ftplugin/javascript.lua new file mode 100644 index 0000000..4b02ba9 --- /dev/null +++ b/ftplugin/javascript.lua @@ -0,0 +1,5 @@ +vim.cmd('setlocal fdm=indent') +vim.cmd('setlocal smartindent') +vim.cmd('setlocal list') +-- set an alternate colorscheme from coding +vim.cmd('colorscheme breezy') diff --git a/ftplugin/javascript.vim b/ftplugin/javascript.vim deleted file mode 100644 index 740b094..0000000 --- a/ftplugin/javascript.vim +++ /dev/null @@ -1,5 +0,0 @@ -setlocal fdm=indent -setlocal smartindent -setlocal list -" set an alternate colorscheme from coding -colorscheme breezy diff --git a/ftplugin/markdown.lua b/ftplugin/markdown.lua new file mode 100644 index 0000000..f9f63dd --- /dev/null +++ b/ftplugin/markdown.lua @@ -0,0 +1,18 @@ +-- set a smaller indent +local indent = 2 +vim.opt.tabstop = indent +vim.opt.shiftwidth = indent +vim.opt.softtabstop = indent + +-- don't hard break text +vim.opt.textwidth = 0 +-- keep soft breaks between words +vim.cmd('setlocal linebreak') +-- turn list off as it interferes with soft wrapping +vim.cmd('setlocal nolist') +-- turn off breaking when typing new text +vim.cmd('setlocal formatoptions-=t') +-- turn off line width hint +vim.cmd('setlocal colorcolumn=0') +-- set an alternate colorscheme from coding +vim.cmd('colorscheme quiet') diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim deleted file mode 100644 index 352e743..0000000 --- a/ftplugin/markdown.vim +++ /dev/null @@ -1,9 +0,0 @@ -" set a smaller indent -setlocal ts=2 -setlocal sw=2 - -" and set up the buffer just like a text file -let oldwd = getcwd() -exec "cd ~/.config/nvim/ftplugin" -source text.vim -exec "cd " . oldwd diff --git a/ftplugin/rust.lua b/ftplugin/rust.lua new file mode 100644 index 0000000..c996ff2 --- /dev/null +++ b/ftplugin/rust.lua @@ -0,0 +1 @@ +vim.g.rustfmt_autosave = 1 diff --git a/ftplugin/rust.vim b/ftplugin/rust.vim deleted file mode 100644 index 4ef03d1..0000000 --- a/ftplugin/rust.vim +++ /dev/null @@ -1 +0,0 @@ -let g:rustfmt_autosave = 1 diff --git a/ftplugin/scala.vim b/ftplugin/scala.vim deleted file mode 100644 index b7bbae5..0000000 --- a/ftplugin/scala.vim +++ /dev/null @@ -1 +0,0 @@ -au BufWrite * :Autoformat diff --git a/ftplugin/text.lua b/ftplugin/text.lua new file mode 100644 index 0000000..039327f --- /dev/null +++ b/ftplugin/text.lua @@ -0,0 +1,12 @@ +-- don't hard break text +vim.opt.textwidth = 0 +-- keep soft breaks between words +vim.cmd('setlocal linebreak') +-- turn list off as it interferes with soft wrapping +vim.cmd('setlocal nolist') +-- turn off breaking when typing new text +vim.cmd('setlocal formatoptions-=t') +-- turn off line width hint +vim.cmd('setlocal colorcolumn=0') +-- set an alternate colorscheme from coding +vim.cmd('colorscheme quiet') diff --git a/ftplugin/text.vim b/ftplugin/text.vim deleted file mode 100644 index 320f546..0000000 --- a/ftplugin/text.vim +++ /dev/null @@ -1,12 +0,0 @@ -" don't hard break text -setlocal tw=0 -" keep soft breaks between words -setlocal linebreak -" turn list off as it interferes with soft wrapping -setlocal nolist -" turn off breaking when typing new text -setlocal formatoptions-=t -" turn off line width hint -setlocal colorcolumn=0 -" set an alternate colorscheme from coding -colorscheme quiet diff --git a/ftplugin/typescript.lua b/ftplugin/typescript.lua new file mode 100644 index 0000000..1a74504 --- /dev/null +++ b/ftplugin/typescript.lua @@ -0,0 +1,13 @@ +vim.g.neoformat_try_node_exe = 1 + +-- set a smaller indent +local indent = 2 +vim.opt.tabstop = indent +vim.opt.shiftwidth = indent +vim.opt.softtabstop = indent + +vim.cmd('setlocal fdm=indent') +vim.cmd('setlocal smartindent') +vim.cmd('setlocal list') +-- set an alternate colorscheme from coding +vim.cmd('colorscheme breezy') diff --git a/ftplugin/typescript.vim b/ftplugin/typescript.vim deleted file mode 100644 index aaaae00..0000000 --- a/ftplugin/typescript.vim +++ /dev/null @@ -1,7 +0,0 @@ -let g:neoformat_try_node_exe = 1 -setlocal sw=2 ts=2 -setlocal fdm=indent -setlocal smartindent -setlocal list -" set an alternate colorscheme from coding -colorscheme breezy diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim deleted file mode 100644 index b8f49c5..0000000 --- a/ftplugin/vimwiki.vim +++ /dev/null @@ -1,5 +0,0 @@ -" and set up the buffer just like a markdown file -let oldwd = getcwd() -exec "cd ~/.config/nvim/ftplugin" -source markdown.vim -exec "cd " . oldwd diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim new file mode 120000 index 0000000..4d7d231 --- /dev/null +++ b/ftplugin/vimwiki.vim @@ -0,0 +1 @@ +markdown.vim \ No newline at end of file