Skip to content

Instantly share code, notes, and snippets.

@yukpiz
Last active July 8, 2016 10:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukpiz/7437c011ca1bf0e78c19 to your computer and use it in GitHub Desktop.
Save yukpiz/7437c011ca1bf0e78c19 to your computer and use it in GitHub Desktop.

vim for Java

vimrc

"クラスやメソッドをアウトライン表示(ctagsが必要)
Bundle "taglist.vim"
set tags=tags
let Tlist_Ctags_Cmd="/usr/local/bin/ctags"
let Tlist_Show_One_File=1
let Tlist_Use_Right_Window=1
let Tlist_Exit_OnlyWindow=1
map <silent> <F3> :TlistToggle<CR>

"+luaにして
Bundle "Shougo/neocomplete.vim"
let g:neocomplete#enable_at_startup=1
let g:neocomplete#enable_ignore_case=1
let g:neocomplete#enable_smart_case=1
if !exists('g:neocomplete#keyword_patterns')
    let g:neocomplete#keyword_patterns={}
endif
let g:neocomplete#keyword_patterns./="\h\w*"

"タグ名の補完(微妙)
set complete=.,w,b,u,t,i

"折りたたみ(微妙)
set foldmethod=indent

ctags

~$ wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
~$ tar zxvf ctags-5.8.tar.gz
~$ cd ctags-5.8/
~$ ./configure
~$ make
~$ sudo make install
~$ ctags --version

It requires Vim 7.3.885 or above and "if_lua" enabled Vim( ゚д゚)

~$ vim
neocomplete does not work this version of Vim
It requires Vim 7.3.885 or above and "if_lua" enabled Vim.
~$ sudo apt-get install lua5.2
~$ sudo apt-get install liblua5.2-dev
~$ sudo apt-get install mercurial
~$ sudo hg clone https://vim.googlecode.com/hg/ ./vim/
~$ sudo ./configure --enable-multibyte --with-features-huge \
--disable-selinux --prefix=/usr/local \
--enable-luainterp=yes --with-lua-prefix=/usr
~$ sudo make
~$ sudo make install
~$ vim --version
+lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment