Skip to content

Instantly share code, notes, and snippets.

@cjadeveloper
Created February 17, 2020 20:29
Show Gist options
  • Save cjadeveloper/a42b058ad42e6772279b6df3eac63c1f to your computer and use it in GitHub Desktop.
Save cjadeveloper/a42b058ad42e6772279b6df3eac63c1f to your computer and use it in GitHub Desktop.
My .vimrc file
" Note: Skip initialization for vim-tiny or vim-small.
if 0 | endif
if &compatible
set nocompatible "required Be iMproved
filetype off "required
endif
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
" ###
" ## Added byMe
" #
set splitbelow
set splitright
"split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
au BufNewFile, BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=88
\ set expandtab
\ set autoindent
\ set fileformat=unix
au BufNewFile,BufRead *.js, *.html, *.css
\ set tabstop=2
\ set softtabstop=2
\ set shiftwidth=2
set encoding=utf-8
let g:ycm_autoclose_preview_window_after_completion=1
map space-g :YcmCompleter GoToDefinitionElseDeclaration<CR>
let python_highlight_all=1
syntax on
" Point YCM to the Pipenv created virtualenv, if possible
" At first, get the output of 'pipenv --venv' command.
let pipenv_venv_path = system('pipenv --venv')
" The above system() call produces a non zero exit code whenever
" a proper virtual environment has not been found.
" So, second, we only point YCM to the virtual environment when
" the call to 'pipenv --venv' was successful.
" Remember, that 'pipenv --venv' only points to the root directory
" of the virtual environment, so we have to append a full path to
" the python executable.
if !has('nvim')
if shell_error == 0
let venv_path = substitute(pipenv_venv_path, '\n', '', '')
let g:ycm_python_binary_path = venv_path . '/bin/python'
else
let g:ycm_python_binary_path = 'python'
endif
endif
set nu
set clipboard=unnamed
set mouse=a
"call togglebg#map("<F5>")
" #
" ## End Added byMe
" ###
" Required:
call neobundle#begin(expand('~/.vim/bundle/'))
" Let NeoBundle manage NeoBundle
" Required:
NeoBundleFetch 'Shougo/neobundle.vim'
" My Bundles here:
" Refer to |:NeoBundle-examples|.
" Note: You don't set neobundle setting in .gvimrc!
NeoBundle 'davidhalter/jedi-vim'
" Do not load vim-pyenv until *.py is opened and
" make sure that it is loaded after jedi-vim is loaded.
NeoBundleLazy 'lambdalisue/vim-pyenv', {
\ 'depends': ['davidhalter/jedi-vim'],
\ 'autoload': {
\ 'filetypes': ['python', 'python3'],
\ }}
NeoBundle 'tmhedberg/SimpylFold'
NeoBundle 'vim-scripts/indentpython.vim'
NeoBundle 'Valloric/YouCompleteMe'
NeoBundle 'vim-syntastic/syntastic'
NeoBundle 'nvie/vim-flake8'
NeoBundle 'jnurmine/Zenburn'
NeoBundle 'altercation/vim-colors-solarized'
NeoBundle 'tpope/vim-fugitive'
NeoBundle 'preservim/nerdtree'
map <C-n> :NERDTreeToggle<CR>
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
"NeoBundle 'jistr/vim-nerdtree-tabs'
NeoBundle 'kien/ctrlp.vim'
if !has('nvim')
NeoBundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
else
NeoBundle 'vim-airline/vim-airline'
NeoBundle 'vim-airline/vim-airline-themes'
let g:airline_powerline_fonts = 1
let g:airline_theme='simple'
endif
NeoBundle 'dracula/vim', { 'name': 'dracula' }
NeoBundle 'mattn/emmet-vim'
call neobundle#end()
" Required:
filetype plugin indent on
if has('gui_running')
set background=dark
colorscheme solarized
call togglebg#map("<F5>")
else
"colorscheme zenburn
colorscheme dracula
"colorscheme antares
endif
" If there are uninstalled bundles found on startup,
" this will conveniently prompt you to install them.
NeoBundleCheck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment