Last active
May 5, 2017 11:36
-
-
Save kuba--/5977594b07b52b11e5eba0a44cef7064 to your computer and use it in GitHub Desktop.
.vimrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" NeoBundle Scripts--------------------------------- | |
if has('vim_starting') | |
set runtimepath+=~/.config/nvim/bundle/neobundle.vim/ | |
set runtimepath+=~/.config/nvim/ | |
endif | |
let neobundle_readme=expand('~/.config/nvim/bundle/neobundle.vim/README.md') | |
if !filereadable(neobundle_readme) | |
echo "Installing NeoBundle..." | |
echo "" | |
silent !mkdir -p ~/.config/nvim/bundle | |
silent !git clone https://github.com/Shougo/neobundle.vim ~/.config/nvim/bundle/neobundle.vim/ | |
let g:not_finsh_neobundle = "yes" | |
endif | |
call neobundle#begin(expand('$HOME/.config/nvim/bundle')) | |
NeoBundleFetch 'Shougo/neobundle.vim' | |
" -------------------------------------------------- | |
" THIS IS WHERE PLUGINS WILL COME | |
" -------------------------------------------------- | |
NeoBundle 'scrooloose/nerdtree' | |
NeoBundle 'majutsushi/tagbar' | |
NeoBundle 'tomasr/molokai' | |
NeoBundle 'fatih/vim-go' | |
NeoBundle 'rhysd/vim-clang-format' | |
NeoBundle 'nazo/pt.vim' | |
call neobundle#end() | |
filetype plugin indent on | |
syntax on | |
colorscheme molokai | |
" If there are uninstalled bundles found on startup, | |
" this will conveniently prompt you to install them. | |
NeoBundleCheck | |
"End NeoBundle Scripts------------------------------ | |
let g:go_fmt_command = "goimports" | |
let g:clang_format#detect_style_file=1 | |
let g:clang_format#auto_format=1 | |
let NERDTreeShowHidden=1 | |
let NERDTreeIgnore=['\.vim$', '\~$', '\.git$', '.DS_Store'] | |
set tabstop=4 " Show existing tab with 4 spaces width | |
set shiftwidth=4 " When indenting with '>', use 4 spaces width | |
set expandtab " On pressing tab, insert 4 spaces | |
set autoindent | |
set showmatch | |
set number | |
set cursorline | |
set paste | |
set laststatus=2 | |
set listchars=tab:>· | |
set list | |
set ruler | |
set colorcolumn=120 | |
set noswapfile | |
fun! TrimWhitespace() | |
let l:save_cursor = getpos('.') | |
%s/\s\+$//e | |
call setpos('.', l:save_cursor) | |
endfun | |
autocmd BufWritePre * :call TrimWhitespace() | |
nmap <F8> :TagbarToggle<CR> | |
nmap <F10> :NERDTreeToggle<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment