Skip to content

Instantly share code, notes, and snippets.

@sekayasin
Last active July 27, 2022 18:50
Show Gist options
  • Save sekayasin/550e95ac2f10daa5afb7a2d6241736c8 to your computer and use it in GitHub Desktop.
Save sekayasin/550e95ac2f10daa5afb7a2d6241736c8 to your computer and use it in GitHub Desktop.
my_mac_vimrc
Quick Start
Vundle is short for Vim bundle and is a Vim plugin manager.
Vundle allows you to...
keep track of and configure your plugins right in the .vimrc
install configured plugins (a.k.a. scripts/bundle)
update configured plugins
search by name all available Vim scripts
clean unused plugins up
run the above actions in a single keypress with interactive mode
1. Introduction:
Installation requires Git and triggers git clone for each configured repository to ~/.vim/bundle/ by default. Curl is required for search.
2. Set up Vundle:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
3. Configure Plugins:
Put this below configs at the top of your .vimrc to use Vundle. Remove plugins you don't need, they are for illustration purposes.
----------------------------------------------------------------------------------------------------------------------------
syntax on
set nocompatible
set smartindent
set shiftwidth=4
set backspace=indent,eol,start
set ruler
set number
set showcmd
set incsearch
set hlsearch
set mouse=a
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
"-------------- PLUGINS STARTS -----------------
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdtree'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'scrooloose/syntastic'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-easytags'
Plugin 'majutsushi/tagbar'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'vim-scripts/a.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'Raimondi/delimitMate'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'jez/vim-c0'
Plugin 'jez/vim-ispc'
Plugin 'kchmck/vim-coffee-script'
Plugin 'flazz/vim-colorschemes'
Plugin 'mattn/emmet-vim'
call vundle#end()
"-------------- PLUGINS END --------------------
filetype plugin indent on
"----- GENERAL SETTINGS-------
set laststatus=2
let g:airline_powerline_fonts = 1
let g:airline_detect_paste=1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='solarized'
set background=dark
let g:solarized_termcolors=256
colorscheme solarized
"---------emmet-vim SETTINGS----------
let g:user_emmet_leader_key='<C-Z>'
"---------NERD-TREE SETTINGS----------
nmap <silent> <leader>t :NERDTreeTabsToggle<CR>
let g:nerdtree_tabs_open_on_console_startup = 1
"-------- SYNTASTIC SETTINGS---------
let g:syntastic_error_symbol = '✘'
let g:syntastic_warning_symbol = "▲"
augroup mySyntastic
au!
au FileType tex let b:syntastic_mode = "passive"
augroup END
"-------- TAGS SETTINGS --------------------------------
let g:easytags_events = ['BufReadPost', 'BufWritePost']
let g:easytags_async = 1
let g:easytags_dynamic_files = 2
let g:easytags_resolve_links = 1
let g:easytags_suppress_ctags_warning = 1
let g:tagbar_autoclose=2
nmap <silent> <leader>b :TagbarToggle<CR>
"autocmd BufEnter * nested :call tagbar#autoopen(0)
"---------GIT SETTINGS--------------
hi clear SignColumn
let g:airline#extensions#hunks#non_zero_only = 1
"----------DELIMITEMATE SETTINGS-----------------
let delimitMate_expand_cr = 1
augroup mydelimitMate
au!
au FileType markdown let b:delimitMate_nesting_quotes = ["`"]
au FileType tex let b:delimitMate_quotes = ""
au FileType tex let b:delimitMate_matchpairs = "(:),[:],{:},`:'"
au FileType python let b:delimitMate_nesting_quotes = ['"', "'"]
augroup END
"-----------TMUX SETTINGS--------------
let g:tmux_navigator_save_on_switch = 2
set encoding=utf-8 nobomb
----------------------------------------------------------------------------------------------------------------------------
4. Install Plugins:
Launch vim and run :PluginInstall
To install from command line: vim +PluginInstall +qall
5. (optional) For those using the fish shell: add set shell=/bin/bash to your .vimrc
References
https://github.com/VundleVim/Vundle.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment