Skip to content

Instantly share code, notes, and snippets.

@yolossn
Last active May 30, 2019 10:14
Show Gist options
  • Save yolossn/4f021d6d950a82ac6aaced37ad4d187b to your computer and use it in GitHub Desktop.
Save yolossn/4f021d6d950a82ac6aaced37ad4d187b to your computer and use it in GitHub Desktop.
my vim configuration
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
"emmet plugin for html
Plugin 'mattn/emmet-vim'
"nerdtree plugin
Plugin 'scrooloose/nerdtree'
"nerdtree all tabs
Plugin 'jistr/vim-nerdtree-tabs'
"statusbar airline Plugin
Plugin 'vim-airline/vim-airline'
"tag outliner
Plugin 'majutsushi/tagbar'
"Theme
Plugin 'altercation/vim-colors-solarized'
"Syntax Checker
" Plugin 'scrooloose/syntastic'
Plugin 'w0rp/ale'
"Code Complete
Plugin 'valloric/youcompleteme'
"Nerd Commenter
Plugin 'scrooloose/nerdcommenter'
"numline toggler
Plugin 'jeffkreeftmeijer/vim-numbertoggle'
"Google Search indexer
Plugin 'google/vim-searchindex'
" All of your Plugins must be added before the following line
"CtrlP Plugin
Plugin 'kien/ctrlp.vim'
"Dev icons
Plugin 'ryanoasis/vim-devicons'
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"------------------------------------
"-----------*User Defined*-----------
"------------------------------------
"show relativeline number
set number relativenumber
"highlight current line
set cursorline
"enable syntax highlight
syntax enable
"use to previous line indentation
set autoindent
"show matching braces
set showmatch
"use clipboard
set clipboard=unnamedplus
map <C-c> "+y
"enable python syntax highlighting
let python_highlight_all =1
"set spellcheck
set spell spelllang=en_us
"set spell check highlighting off
set nospell
"set file to add new words added to the spellcheck
set spellfile=~/.vim/spell/en.utf-8.add
"remap to move between splits
nmap <c-h> <c-w>h<c-w>
nmap <c-l> <c-w>l<c-w>
nmap <c-j> <c-w>j<c-w>
nmap <c-k> <c-w>k<c-w>
"esc alternative
imap ;; <Esc>
"window size
map <s-j> <c-w>+
map <s-k> <c-w>-
map <s-h> <c-w><
map <s-l> <c-w>>
"paste toggle
set pastetoggle=<F2>
"emmet map
let g:user_emmet_leader_key='<C-X>'
"nerdtree map
map <C-n> :NERDTreeToggle<CR>
"tagbar keymap
nmap <F8> :Tagbar<CR>
"syntastic
" let g:syntastic_check_on_open=0
" let g:syntastic_enable_signs=1
" let g:syntastic_c_checkers=['gcc']
" let g:syntastic_python_checkers = ['flake8']
" let g:syntastic_javascript_checkers = ['eslint']
" let g:syntastic_javascript_eslint_exe = 'npm run lint --'
" ALE
let g:ale_fixers={
\'*': ['remove_trailing_lines','trim_whitespace'],
\'javascript':['eslint'],
\'python':['flake8'],
\'c':['clang'],
\'cpp':['clang']
\}
let g:ale_sign_error = '❌'
let g:ale_sign_warning = '💩'
let g:ale_lint_on_text_changed = 'never'
nmap <silent> [ <Plug>(ale_previous_wrap)
nmap <silent> ] <Plug>(ale_next_wrap)
"YouCompleteMe
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/cpp/ycm/.ycm_extra_conf.py'
let g:ycm_confirm_extra_conf = 1
let g:ycm_python_binary_path = '/usr/bin/python3'
let g:ycm_show_diagnostics_ui = 1
let g:ycm_autoclose_preview_window_after_insertion = 1
let g:ycm_auto_trigger = 1
"color scheme
set background=dark
colorscheme solarized
"fold code
set foldmethod=syntax
set nofoldenable
nnoremap <space> za
"Nerd Commenter
" Add spaces after comment delimiters by default
let g:NERDSpaceDelims = 1
"Comment based on file type
filetype plugin on
" Use compact syntax for prettified multi-line comments
let g:NERDCompactSexyComs = 1
"ctags
set tag=tags
@yolossn
Copy link
Author

yolossn commented Nov 29, 2017

Link to Good resource for learning vim.

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