Merge branch 'master' of github.com:Pezz89/vimconfig
This commit is contained in:
+13
-19
@@ -2,31 +2,17 @@ Installation:
|
||||
|
||||
git clone https://github.com/Pezz89/vimconfig.git ~/.vim
|
||||
|
||||
Local vimrc (.lvimrc)
|
||||
once plugins have been installed, it is possible to set up a vimrc locally for both machine and individual projects
|
||||
create a file called .lvimrc in the home directory and it will be sourced any time a file is accessed in a sub folder of that directory
|
||||
In addition, .lvimrc files can be placed in project folder to allow for project specific vim configuartions
|
||||
|
||||
Create symlinks:
|
||||
|
||||
ln -s ~/.vim/vimrc ~/.vimrc
|
||||
|
||||
Fetch submodules:
|
||||
cd ~/.vim
|
||||
git submodule update --init --recursive
|
||||
|
||||
To upgrade all modules run:
|
||||
|
||||
git submodule foreach git pull origin master --recursive(?)
|
||||
|
||||
To upgrade a single plugin run:
|
||||
|
||||
cd ~/.vim/bundle/fugitive
|
||||
git pull origin master
|
||||
|
||||
To fix colour (/lack of) problems add the following lines to ~/.bashrc:
|
||||
export TERM="xterm-256color"
|
||||
|
||||
Install a new submodule plugin:
|
||||
cd ~/.vim
|
||||
git submodule add git://github.com/tpope/vim-fugitive.git bundle/fugitive
|
||||
git submodule init && git submodule update
|
||||
|
||||
Installing a local copy of Vim:
|
||||
cd ~/.vim/vim/
|
||||
make distclean
|
||||
@@ -59,3 +45,11 @@ Setting enviroment variables in .cshrc for VIM:
|
||||
setenv VIM "~/.vim/vim/src/vim"
|
||||
setenv VIMRUNTIME "~/.vim/vim/runtime"
|
||||
setenv EDITOR 'vim'
|
||||
|
||||
Installing YouCompleteMe (YCM):
|
||||
# Set pyenv python to system version to avoid a broken compilation
|
||||
pyenv global system
|
||||
# A workaround to the lack of a "python2" executable with pyenv
|
||||
cd /usr/bin && sudo ln -s python python2
|
||||
# Run the install script from the YCM directory
|
||||
./install.sh --clang-completer --system-libclang
|
||||
@@ -32,14 +32,20 @@ Plugin 'nvie/vim-togglemouse'
|
||||
Plugin 'benmills/vimux'
|
||||
Plugin 'julienr/vimux-pyutils'
|
||||
Plugin 'embear/vim-localvimrc'
|
||||
Plugin 'tpope/vim-surround'
|
||||
call vundle#end() " required
|
||||
filetype plugin indent on " required
|
||||
filetype on
|
||||
filetype plugin on
|
||||
filetype indent on
|
||||
" ====================================
|
||||
" General vim settings
|
||||
" ====================================
|
||||
" Set the default shell
|
||||
set shell=zsh\ -l
|
||||
|
||||
" Set spell checker language
|
||||
set spelllang=en_gb
|
||||
|
||||
" Allow the use of the mouse in vim
|
||||
set mouse=a
|
||||
|
||||
@@ -88,10 +94,6 @@ set ignorecase
|
||||
" Show search result before moving to it
|
||||
set incsearch
|
||||
|
||||
" Quickly edit/reload the vimrc file
|
||||
nmap <silent> <leader>ev :e $MYVIMRC<CR>
|
||||
nmap <silent> <leader>sv :so $MYVIMRC<CR>
|
||||
|
||||
" ====================================
|
||||
" Solarized settings
|
||||
" ====================================
|
||||
@@ -139,7 +141,7 @@ set hidden
|
||||
" ====================================
|
||||
|
||||
autocmd FileType html,htmldjango,jinjahtml,eruby,mako let b:closetag_html_style=1
|
||||
autocmd FileType html,xhtml,xml,htmldjango,jinjahtml,eruby,mako source ~/.vim/bundle/closetag/plugin/closetag.vim
|
||||
autocmd FileType html,xhtml,xml,htmldjango,jinjahtml,eruby,mako source ~/.vim/bundle/closetag.vim/plugin/closetag.vim
|
||||
autocmd FileType html,xhtml,xml,htmldjango,jinjahtml,eruby,mako set smarttab
|
||||
|
||||
" ====================================
|
||||
@@ -234,6 +236,11 @@ set completeopt=preview,preview
|
||||
" Limit popup menu height
|
||||
set pumheight=20"
|
||||
|
||||
" ====================================
|
||||
" YouCompleteMe Settings
|
||||
" ====================================
|
||||
let g:ycm_path_to_python_interpreter = '/usr/bin/python'
|
||||
|
||||
" ====================================
|
||||
" VIMUX Commands
|
||||
" ====================================
|
||||
@@ -333,6 +340,10 @@ nnoremap <c-k> <c-w>k
|
||||
nnoremap <c-h> <c-w>h
|
||||
nnoremap <c-l> <c-w>l
|
||||
|
||||
" Quickly edit/reload the vimrc file
|
||||
nmap <silent> <leader>ev :e $MYVIMRC<CR>
|
||||
nmap <silent> <leader>sv :so $MYVIMRC<CR>
|
||||
|
||||
" ====================================
|
||||
|
||||
" Source local vim script for the current machine
|
||||
|
||||
Reference in New Issue
Block a user