git clone https://github.com/jianqiang03/vim_tmux_ubuntu.git
- Install Colors and Dircolors following Anthony25/gnome-terminal-colors-solarized.
$ sudo apt-get install dconf-cli $ git clone https://github.com/Anthony25/gnome-terminal-colors-solarized.git $ cd gnome-terminal-colors-solarized $ ./install.sh
- After installation, add the following codes in
.bashrc
if [ -f ~/.dir_colors/dircolors ] then eval `dircolors ~/.dir_colors/dircolors` fi
- If you cannot install Dircolors in server, a quick solution is to add
LS_COLORS=$LS_COLORS:'di=0;35:' ; export LS_COLORS
in.bashrc
- Install Vundle to manage the plug-ins
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
- Copy vimrc to
~/.vimrc
# Please remember to backup your own `.vimrc` before overwrite it. cd ~/vim_tmux_ubuntu cp vimrc ~/.vimrc
- Install the plugins
vim ~/.vimrc :PluginInstall
- Install YouCompleteMe plugin (Optional)
cd ~/.vim/bundle/YouCompleteMe python install.py
Now, you can use Vim to edit edit your files with Solarized Color scheme. However, the color does not display correctly when you run Vim inside Tmux.
- Copy
tmux.conf
to~/.tmux.conf
- Add
export TERM='screen-256color
in.bashrc
- Add
source .bashrc
in.bash_profile
(Tmux source.bash_profile
when starting up)
- Reference: iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + Powerlevel9k - (macOS)
- Install iTerm2:
brew cask install iterm2
- Install
Oh My Zsh
After installation, opensh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
~/.zshrc
and setZSH_THEME="af-magic"
. - Install Powerline fonts (Meslo Font)
- Download Meslo font from the github link and install it.
- Set this font in iTerm2 (15px is okay) :
(iTerm -> Preferences -> Profiles -> Text -> Change Font)
- Set Terminal Emulation: in
Preferences -> Profiles -> Terminal
, under"Terminal Emulation"
you have"Report Terminal Type:"
set toxterm-256color.
- Restart iTerm2 for all changes to take effect.
The same as Vim Configuration for Ubuntu.
- Copy
tmux.conf_mac
to~/.tmux.conf
-
Install SecureCrt
-
Set Terminal Emulation: in
Options -> Global Options -> Default Session -> Edit Default Settings -> Terminal -> Emulation
, chooseXterm
andANSI Color
underEmulation options
. -
Set color scheme to solarized dark: open file
~/Library/Application Support/VanDyke/SecureCRT/Config/Global.ini
and replace the corresponding code patch with the following:B:"ANSI Color RGB"=00000040 07 36 42 00 dc 32 2f 00 85 99 00 00 b5 89 00 00 26 8b d2 00 d3 36 82 00 2a a1 98 00 ee e8 d5 00 00 2b 38 00 cb 4b 16 00 58 6e 75 00 65 7b 83 00 83 94 96 00 6c 71 c4 00 93 a1 a1 00 fd f6 e3 00
-
The NERD tree : A tree explorer plugin for navigating the filesystem.
The NERD tree allows you to explore your filesystem and to open files and directories. It presents the filesystem to you in the form of a tree which you manipulate with the keyboard and/or mouse. It also allows you to perform simple filesystem operations.# We use <F3> to toggle the tree explorer nmap <F3> :NERDTreeToggle<cr>
-
Tagbar : Display tags of the current file ordered by scope
Tagbar is a Vim plugin that provides an easy way to browse the tags of the current file and get an overview of its structure. It does this by creating a sidebar that displays the ctags-generated tags of the current file, ordered by their scope. This means that for example methods in C++ are displayed under the class they are defined in.# We use <F4> to toggle the tree explorer nmap <F4> :TagbarToggle<CR>
-
The CtrlP Plugin
Full path fuzzy file, buffer, mru, tag, ... finder for Vim. You can run the follow command to invoke it<ctrl>+p
-
The Vim-fugitive Plugin
fugitive.vim may very well be the best Git wrapper of all time. -
The SnipMate Plugin
SnipMate aims to provide support for textual snippets, similar to TextMate or other Vim plugins like UltiSnips. To install SnipMat plugin, you have to install some dependence" Plugin for snipmate Plugin 'MarcWeber/vim-addon-mw-utils' Plugin 'tomtom/tlib_vim' Plugin 'garbas/vim-snipmate' Plugin 'honza/vim-snippets' " Optional
Hope you enjoy programming with Vim and Tmux.