Skip to content

Instantly share code, notes, and snippets.

@springle
Last active March 24, 2018 14:30
Show Gist options
  • Save springle/0fdde7963bc3d02a68ecc1592f524803 to your computer and use it in GitHub Desktop.
Save springle/0fdde7963bc3d02a68ecc1592f524803 to your computer and use it in GitHub Desktop.
" VUNDLE
let g:vundle_default_git_proto = 'git'
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'liuchengxu/space-vim-dark'
Plugin 'junegunn/goyo.vim'
call vundle#end()
filetype plugin indent on
" NERDTREE
map <C-n> :NERDTreeToggle<CR>
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
let g:NERDTreeShowIgnoredStatus = 1
let g:NERDTreeShowHidden=0
" STYLE
syntax on
set number
set background=dark
set t_ut=
colorscheme space-vim-dark
hi Comment cterm=italic
let g:space_vim_dark_background = 235
color space-vim-dark
" REMEMBER POSITION
set viminfo='10,\"100,:20,%,n~/.viminfo
function! ResCur()
if line("'\"") <= line("$")
normal! g`"
return 1
endif
endfunction
augroup resCur
autocmd!
autocmd BufWinEnter * call ResCur()
augroup END
" MISC
syntax on
filetype indent on
set tabstop=2
set shiftwidth=2
set expandtab
" CLEAR WHITESPACE
autocmd FileType * autocmd BufWritePre <buffer> %s/\s\+$//e
nnoremap <F5> :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>
" MAP JK-><ESC>
:imap jk <Esc>
@springle
Copy link
Author

springle commented Oct 17, 2017

Installation instructions:

  1. clone ~/.vimrc
  2. install Vundle: git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  3. run (in VIM) :PluginInstall and :PluginUpdate
  4. run (in Terminal)
    cd ~/.vim/bundle/YouCompleteMe
    ./install.py --clang-completer
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment