Created
May 24, 2023 08:19
-
-
Save jserpapinto/172a37854f54c2ef92514d6dfa882a13 to your computer and use it in GitHub Desktop.
Vim configuration file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let mapleader=" " | |
nnoremap <SPACE> <Nop> | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" Vundle begin | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' " let Vundle manage Vundle, required | |
Plugin 'tpope/vim-fugitive' " git plugin | |
Plugin 'hashivim/vim-terraform' " terraform | |
Plugin 'vim-syntastic/syntastic' " vim-terraform-completion dependency | |
set statusline+=%#warningmsg# | |
set statusline+=%{SyntasticStatuslineFlag()} | |
set statusline+=%* | |
" When this is loaded with vim-terraform, closing vim takes like 3 secs. | |
" https://github.com/hashivim/vim-terraform/issues/170 | |
" Plugin 'juliosueiras/vim-terraform-completion' " terraform completion | |
Plugin 'junegunn/fzf' " fuzzy finder | |
Plugin 'junegunn/fzf.vim' " fuzzy finder | |
nmap ; :Buffers<CR> | |
nmap <Leader>f :Files<CR> | |
nmap <Leader>t :Tags<CR> | |
Plugin 'itchyny/lightline.vim' " colors for modes | |
set laststatus=2 | |
Plugin 'scrooloose/nerdtree' " NERDTree | |
map <C-t> :NERDTreeToggle<CR> | |
Plugin 'airblade/vim-gitgutter' " also for git | |
set updatetime=500 | |
Plugin 'pearofducks/ansible-vim' | |
au BufRead,BufNewFile */{playbooks,plays}/*.yml set filetype=yaml.ansible | |
au BufRead,BufNewFile */templates/* set filetype=ruby.jinja2 | |
Plugin 'ntpeters/vim-better-whitespace' | |
call vundle#end() " required | |
filetype plugin indent on " required | |
" Vundle end | |
" 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 | |
" Vagrantfile | |
augroup vagrant | |
au! | |
au BufRead,BufNewFile Vagrantfile set filetype=ruby | |
augroup END | |
" As seen here: https://dougblack.io/words/a-good-vimrc.html | |
colorscheme brogrammer " awesome colorscheme | |
syntax enable " enable syntax processing | |
set tabstop=2 shiftwidth=2 expandtab " number of visual spaces per TAB | |
set softtabstop=2 " number of spaces in tab when editing | |
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab " Get the 2-space YAML as the default when hit carriage return after the colon | |
set nu rnu " show line numbers | |
set showcmd " show command in bottom bar | |
set cursorline " highlight current line | |
filetype indent on " load filetype-specific indent files | |
set wildmenu " visual autocomplete for command menu | |
set lazyredraw " redraw only when we need to. | |
set showmatch " highlight matching [{()}] | |
set incsearch " search as characters are entered | |
set hlsearch " highlight matches | |
" turn off search highlight | |
nnoremap <leader><space> :nohlsearch<CR> | |
" move vertically by visual line | |
nnoremap j gj | |
nnoremap k gk | |
" highlight last inserted text | |
nnoremap gV `[v`] | |
set mouse=a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment