Skip to content

Instantly share code, notes, and snippets.

@amunchet
Created August 10, 2021 16:32
Show Gist options
  • Save amunchet/11c7aad37a7260b4fd3789b667a1e27f to your computer and use it in GitHub Desktop.
Save amunchet/11c7aad37a7260b4fd3789b667a1e27f to your computer and use it in GitHub Desktop.
Vim settings
" Sets up the backgrounds and search syntax
set background=dark
set smartcase
set hlsearch
" Sets up the indents
set smartindent
set autoindent
" Sets up the folding
set foldmethod=indent
set foldlevel=1
set foldclose=all
" Sets up the statusline
" set statusline+=%F
" set laststatus=2
set title
" Autoplugs and addons sections
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
" Jedi - NOT USING THIS
" Plug 'davidhalter/jedi-vim'
" We had to dos2unix all the line ends - super weird actually. Might be my
" fault with git settings
"Color scheme
Plug 'flazz/vim-colorschemes'
" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'
" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" On-demand loading
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }
" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" Unmanaged plugin (manually installed and updated)
"Plug '~/my-prototype-plugin'
" AutoTag plug
Plug 'craigemery/vim-autotag'
Plug 'powerline/powerline'
" Vue plugin
Plug 'posva/vim-vue'
" Initialize plugin system
call plug#end()
" PlugInstall and PlugUpdate will clone fzf in ~/.fzf and run the install script
"autocmd vimenter * NERDTree
map <C-n> :NERDTreeToggle<CR>
" Sets up the colorscheme
colorscheme molokai
" Fixes the visualization
hi Visual term=reverse cterm=reverse guibg=Grey
autocmd Filetype yml setlocal tabstop=2 shiftwidth=2
autocmd Filetype yaml setlocal tabstop=2 shiftwidth=2
autocmd Filetype py setlocal tabstop=4 shiftwidth=2
autocmd Filetype php setlocal tabstop=4 shiftwidth=2
" Vue fixes
autocmd BufRead,BufNewFile *.vue setlocal filetype=vue.html.javascript.css ts=2 softtabstop=2 sw=2 expandtab
"let g:vim_vue_plugin_load_full_syntax = 1
"let g:vim_vue_plugin_debug = 1
" Fixes the annoying scratch window - THIS BREAKS KITE. DONT USE IT IF YOU
" USE KITE
" set completeopt-=preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment