Skip to content

Instantly share code, notes, and snippets.

@jorandradefig
Created August 9, 2020 20:26
Show Gist options
  • Save jorandradefig/f7e6905a1605fe3cb8a820329e297a72 to your computer and use it in GitHub Desktop.
Save jorandradefig/f7e6905a1605fe3cb8a820329e297a72 to your computer and use it in GitHub Desktop.
```bash
set shell=/bin/zsh " Changing shell for Vim from fish to /bin/bash
set nocompatible
set rtp+=/usr/local/opt/fzf " Turn on use of fzf inside Vim
let mapleader=","
syntax enable " Turn on syntax highlighting.
runtime macros/matchit.vim " Load the matchit plugin.
set showcmd " Display incomplete commands.
set showmode " Display the mode you're in.
set backspace=indent,eol,start " Intuitive backspacing.
set hidden " Handle multiple buffers better.
set wildmenu " Enhanced command line completion.
set wildmode=list:longest " Complete files like a shell.
set ignorecase " Case-insensitive searching.
set smartcase " But case-sensitive if expression contains a capital letter.
set number " Show line numbers.
set ruler " Show cursor position.
set incsearch " Highlight matches as you type.
set hlsearch " Highlight matches.
set wrap " Turn on line wrapping.
set scrolloff=0 " Show 3 lines of context around the cursor.
set title " Set the terminal's title
set visualbell " No beeping.
set nobackup " Don't make a backup before overwriting a file.
set nowritebackup " And again.
set directory=$HOME/.vim/tmp//,. " Keep swap files in one location
" UNCOMMENT TO USE
set tabstop=2 " Global tab width.
set shiftwidth=2 " And again, related.
set expandtab " Use spaces instead of tabs
set laststatus=2 " Show the status line all the time
"set wildignore+=**/target/*,tmp/*,*.swp,*.class,**/build/**
"let NERDTreeIgnore=['build']
" Or use vividchalk
" colorscheme solarized
" colorscheme topfunky-light
" colorscheme vividchalk
colorscheme default
" Tab mappings.
map <leader>tt :tabnew<cr>
map <leader>te :tabedit
map <leader>tc :tabclose<cr>
map <leader>to :tabonly<cr>
map <leader>tn :tabnext<cr>
map <leader>tp :tabprevious<cr>
map <leader>tf :tabfirst<cr>
map <leader>tl :tablast<cr>
map <leader>tm :tabmove
" Uncomment to use Jamis Buck's file opening plugin
"map <Leader>t :FuzzyFinderTextMate<Enter>
" Controversial...swap colon and semicolon for easier commands
"nnoremap ; :
"nnoremap : ;
"vnoremap ; :
"vnoremap : ;
" Automatic fold settings for specific files. Uncomment to use.
" autocmd FileType ruby setlocal foldmethod=syntax
" autocmd FileType css setlocal foldmethod=indent shiftwidth=2 tabstop=2
" For the MakeGreen plugin and Ruby RSpec. Uncomment to use.
"autocmd BufNewFile,BufRead *_spec.rb compiler rspec
" Recompile a coffee file when it's written and compiles silently and with the -b
" option, but show any errors
" au BufWritePost *.coffee silent CoffeeMake! -b | cwindow | redraw!
" au BufWritePost *.coffee make! -b | cwindow | redraw!
"au BufNewFile,BufRead *.gradle set filetype=groovy
"au BufNewFile,BufRead *.gsp set filetype=html
"au BufWritePre * :%s/\s\+$//e
"set background=dark
" set number " Show current line number
set relativenumber " Show relative line numbers
set encoding=utf8
set list
"set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
set listchars=eol:$
" Use spaces instead of tabs
"set expandtab
"set smarttab
" 1 tab == 4 spaces
"set shiftwidth=4
"set tabstop=4
"set ai "Auto indent
"set si "Smart indent
"set wrap "Wrap lines
set foldmethod=indent
set foldlevel=0
"set foldclose=all
filetype off " Required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim' " Required
Plugin 'zenorocha/dracula-theme', {'rtp': 'vim/'}
Plugin 'sheerun/vim-polyglot'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'scrooloose/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'
Plugin 'Valloric/YouCompleteMe'
Plugin 'terryma/vim-multiple-cursors'
Plugin 'edkolev/tmuxline.vim'
Plugin 'scrooloose/nerdcommenter'
Plugin 'nathanaelkane/vim-indent-guides'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-commentary'
Plugin 'altercation/vim-colors-solarized'
Plugin 'easymotion/vim-easymotion'
Plugin 'haya14busa/vim-easyoperator-line'
Plugin 'haya14busa/vim-easyoperator-phrase'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'xolox/vim-misc'
Plugin 'xolox/vim-easytags'
Plugin 'majutsushi/tagbar'
Plugin 'jistr/vim-nerdtree-tabs'
Plugin 'vim-scripts/a.vim'
Plugin 'Raimondi/delimitMate'
Plugin 'jez/vim-superman'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'ntpeters/vim-better-whitespace'
Plugin 'godlygeek/tabular'
Plugin 'HTML-AutoCloseTag'
Plugin 'ervandew/screen'
Plugin 'posva/vim-vue'
Plugin 'digitaltoad/vim-pug'
Plugin 'luochen1990/rainbow'
Plugin 'chrisbra/Colorizer'
Plugin 'liuchengxu/vim-which-key'
Plugin 'vifm/vifm.vim'
Plugin 'vimwiki/vimwiki'
let g:rainbow_active = 1
"set statusline+=%#warningmsg#
"set statusline+=%{SyntasticStatuslineFlag()}
"set statusline+=%*
let g:airline_theme='powerlineish'
let g:airline_powerline_fonts=1
let g:EditorConfig_core_mode = 'external_command'
map <C-x> :NERDTreeToggle<CR>
let g:NERDTreeShowHidden=1
map <Leader> <Plug>(easymotion-prefix)
map <C-]> :YcmCompleter GoToImprecise<CR>
let g:indent_guides_enable_on_vim_startup = 1
let g:indent_guides_auto_colors = 0
"let g:indent_guides_guide_size = 1
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd guibg=darkgrey ctermbg=8
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=darkgrey ctermbg=7
map <leader>c :CommandT<CR>
map <leader>f :CommandTFlush<CR>
"let g:syntastic_python_checkers = ['pylint', 'flake8']
"let g:syntastic_html_checkers = ['w3']
"let g:syntastic_javascript_checkers = ['standard']
"let g:syntastic_enable_elixir_checker = 1
"let g:syntastic_aggregate_errors = 1
"let g:syntastic_always_populate_loc_list = 1
"let g:syntastic_auto_loc_list = 1
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
call vundle#end() " Required
filetype plugin indent on " Required
"source ~/.vim/vim_config.vim
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment