Wednesday, July 18, 2018

VIM pretty theme and CTAGS setup in Raspberry PI

In Linux terminal, VIM is a widely used editor, come in default, support a lot of features, long history (stable). Since I am  using it everyday, so I was thinking to make the editor nice to view.

First is finding a suitable themes, after trying a few, I found this:
My favorite:


Steps:
1. Create directory. If you cannot see the folder ".vim/colors", create using "mkdir -p .vim/colors"
pi@raspberrypi:~/.vim/colors $ ls
atom-dark-256.vim  atom-dark.vim  codedark.vim  dracula.vim - should be empty for your case
3. Find and copy "codedark.vim" to .vim/colors
4. Create if not found. "vi ~/.vimrc". Add below details, then save it.
"set background=dark
set number
set t_Co=256
set t_ut=
colorscheme codedark
syntax on
5. done. You can have pretty source code viewer now.


Ok, now I have pretty view. I want to have simple source code navigator in VIM. So, I decided to install & setup CTAGS.


Steps:
1. sudo apt-get install exuberant-ctags
2. cd ~/.vim/
3. wget https://www.vim.org/scripts/download_script.php?src_id=19574 -O taglist_46.zip
4. unzip taglist_46.zip
5. vim ~/.vimrc
Add following line:
filetype plugin on
nnoremap <F12> :TlistToggle
6. Done. You have pretty vim with simple source code navigator.

Now, my final .vimrc file look like following:

No comments:

Post a Comment