Browse Source

Fix leader config error

Signed-off-by: Ein Verne <[email protected]>
pull/4/head
Ein Verne 7 years ago
parent
commit
3e315db0be
  1. 1
      .vim/startup/vundle_vimrc
  2. 65
      .vimrc
  3. 29
      README.md
  4. 16
      install.sh

1
.vim/startup/vundle_vimrc

@ -39,6 +39,7 @@ Plugin 'WolfgangMehner/vim-plugins'
Plugin 'L9' Plugin 'L9'
Plugin 'perl-support.vim' Plugin 'perl-support.vim'
Plugin 'christoomey/vim-tmux-navigator' Plugin 'christoomey/vim-tmux-navigator'
Plugin 'tpope/vim-surround'
" Git plugin not hosted on GitHub " Git plugin not hosted on GitHub
Plugin 'git://git.wincent.com/command-t.git' Plugin 'git://git.wincent.com/command-t.git'

65
.vimrc

@ -9,22 +9,6 @@ else
let g:isGUI = 0 let g:isGUI = 0
endif endif
" 引用vundle_vimrc
" 引用python_vimrc配置文件
if g:iswindows
source $VIM/vundle_vimrc
source $VIM/python_vimrc
else
source $HOME/.vim/startup/vundle_vimrc
source $HOME/.vim/startup/python_vimrc
source $HOME/.vim/startup/map_vimrc
source $HOME/.vim/startup/plugin_vimrc
endif
" source $VIMRUNTIME/vimrc_example.vim
" source $VIMRUNTIME/mswin.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General " => General
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -63,7 +47,7 @@ endif
" 如下命令使鼠标用起来象微软 Windows " 如下命令使鼠标用起来象微软 Windows
" behave mswin " behave mswin
" 高亮整行 " 高亮整行 只在普通模式下开启
set cursorline set cursorline
" always show current position " always show current position
@ -219,6 +203,35 @@ set statusline+=%3*%c, "column
set statusline+=%l/%L "line no/all line" set statusline+=%l/%L "line no/all line"
set statusline+=\ %P set statusline+=\ %P
" 在普通模式下用块状光标,在插入模式下用条状光标(形状类似英文 "I"
" 的样子),然后在替换模式中使用下划线形状的光标。
if empty($TMUX)
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
if v:version >= 800
let &t_SR = "\<Esc>]50;CursorShape=2\x7"
endif
else
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
if v:version >= 800
let &t_SR = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=2\x7\<Esc>\\"
endif
endif
if &term =~ "xterm\\|rxvt"
" use an orange cursor in insert mode
let &t_SI = "\<Esc>]12;orange\x7"
" use a red cursor otherwise
let &t_EI = "\<Esc>]12;gray\x7"
silent !echo -ne "\033]12;gray\007"
" reset cursor when vim exits
autocmd VimLeave * silent !echo -ne "\033]112\007"
" use \003]12;gray\007 for gnome-terminal and rxvt up to version 9.21
endif
autocmd InsertLeave,WinEnter * set cursorline
autocmd InsertEnter,WinLeave * set nocursorline
@ -269,3 +282,21 @@ function! MyDiff()
endif endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction endfunction
" 依据 https://stackoverflow.com/a/8218188/1820217 将 Plugin map
" 移到最后,使得 leader 生效
" 引用vundle_vimrc
" 引用python_vimrc配置文件
if g:iswindows
source $VIM/vundle_vimrc
source $VIM/python_vimrc
else
source $HOME/.vim/startup/vundle_vimrc
source $HOME/.vim/startup/python_vimrc
source $HOME/.vim/startup/map_vimrc
source $HOME/.vim/startup/plugin_vimrc
endif
" source $VIMRUNTIME/vimrc_example.vim
" source $VIMRUNTIME/mswin.vim

29
README.md

@ -1,24 +1,24 @@
This is my vim conf file. This is my vim conf file.
vundle相关配置在vundle_vimrc中,用vundle管理插件,插件列表`:PluginList`查看 vundle相关配置在vundle_vimrc中,用vundle管理插件,插件列表`:PluginList`查看
python相关配置在python_vimrc中 python相关配置在python_vimrc中
## Instruction under Linux ## Instruction under Linux
Just run `./install.sh`, everything is done. Then Enter the vim run `:PluginInstall` to install all plugins. Just run `./install.sh`, everything is done. Then Enter the vim run `:PluginInstall` to install all plugins.
### install manually
Or, you can do it manually follow the step: Or, you can do it manually follow the step:
Install Vundle to `~/.vim/` directory. 1. Install Vundle to `~/.vim/` directory.
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
Enter vim, run `:PluginInstall`, after install all plugin, you will meet an error, 2. Enter vim, run `:PluginInstall`, after install all plugin, you will meet an error,
> Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded. > Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.
I find a solution on [StackOverflow](http://stackoverflow.com/questions/7454796/taglist-exuberant-ctags-not-found-in-path)
For Ubuntu and derivatives: For Ubuntu and derivatives:
sudo apt-get install exuberant-ctags sudo apt-get install exuberant-ctags
@ -27,3 +27,24 @@ with yum:
sudo yum install ctags-etags sudo yum install ctags-etags
## Plugin
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
Plugin 'scrooloose/nerdtree'
Plugin 'davidhalter/jedi-vim'
Plugin 'ervandew/supertab'
Plugin 'Raimondi/delimitMate'
Plugin 'tomasr/molokai'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'vim-scripts/taglist.vim'
Plugin 'WolfgangMehner/vim-plugins'
Plugin 'L9'
Plugin 'perl-support.vim'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'tpope/vim-surround'
Plugin 'git://git.wincent.com/command-t.git'

16
install.sh

@ -14,19 +14,21 @@ if [ "$use_vim_configs" == "Y" ] || [ "$use_vim_configs" == "y" ]; then
mv $VIMDIR/.vimrc $VIMDIR/.vimrc.old mv $VIMDIR/.vimrc $VIMDIR/.vimrc.old
echo "origin .vimrc has been moved to .vimrc.old" echo "origin .vimrc has been moved to .vimrc.old"
fi fi
ln -s $PWD/.vim $VIMDIR/.vim 2> /dev/null ln -rsf $PWD/.vim $VIMDIR/.vim 2> /dev/null
ln -s $PWD/.vimrc $VIMDIR/.vimrc 2> /dev/null ln -rsf $PWD/.vimrc $VIMDIR/.vimrc 2> /dev/null
if [ -f "$VIMDIR/.tmux.conf" ]; then if [ -f "$VIMDIR/.tmux.conf" ]; then
mv $VIMDIR/.tmux.conf $VIMDIR/.tmux.conf.old mv $VIMDIR/.tmux.conf $VIMDIR/.tmux.conf.old
echo "origin .tmux.conf has been moved to .tmux.conf.old" echo "origin .tmux.conf has been moved to .tmux.conf.old"
fi fi
ln -s $PWD/tmux/.tmux.conf $VIMDIR/.tmux.conf 2> /dev/null ln -rsf $PWD/tmux/.tmux.conf $VIMDIR/.tmux.conf 2> /dev/null
ln -s $PWD/tmux/.tmux.conf.local $VIMDIR/.tmux.conf.local 2> /dev/null ln -rsf $PWD/tmux/.tmux.conf.local $VIMDIR/.tmux.conf.local 2> /dev/null
fi fi
sudo apt-get install -y git
git submodule init && git submodule update git submodule init && git submodule update
# install ctags to solve "Exuberant ctags not found in PATH" error # install ctags to solve "Exuberant ctags not found in PATH" error
sudo apt-get install exuberant-ctags sudo apt-get install -y exuberant-ctags
sudo apt-get install vim sudo apt-get install -y vim
sudo apt-get install tmux sudo apt-get install -y tmux

Loading…
Cancel
Save