Skip to content

Instantly share code, notes, and snippets.

@ramses-lopez
Last active September 30, 2020 15:37
Show Gist options
  • Save ramses-lopez/42e4f0bd384216abfd0959d4c6fe522e to your computer and use it in GitHub Desktop.
Save ramses-lopez/42e4f0bd384216abfd0959d4c6fe522e to your computer and use it in GitHub Desktop.
.vimrc
" color column
set cc=100
set nu rnu
" Indentation w/o hard tabs
set expandtab
set shiftwidth=2
set softtabstop=2
set tabstop=2
set nowrap
set autoindent
set cursorline
" set hlsearch
filetype plugin on
syntax on
" autoinstall vimplug
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
" VimPlug plugins -- vimawesome.com
call plug#begin()
" Vim defaults
Plug 'tpope/vim-sensible'
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'kchmck/vim-coffee-script'
Plug 'tpope/vim-endwise'
Plug 'airblade/vim-gitgutter'
Plug 'vim-airline/vim-airline'
" Alternate between relative and absolute numbers
Plug 'myusuf3/numbers.vim'
" Plug 'valloric/youcompleteme'
" Plug 'vim-scripts/dbext.vim'
Plug 'tpope/vim-fugitive'
Plug 'neoclide/coc.nvim', {'branch': 'release' }
" Themes
Plug 'artanikin/vim-synthwave84'
" Plug 'dracula/dracula-theme'
Plug 'nanotech/jellybeans.vim'
Plug 'Rigellute/shades-of-purple.vim'
Plug 'joshdick/onedark.vim'
call plug#end()
" enable 24bit color
if exists('+termguicolors')
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
" set runtimepath+=~/.vim/plugged/dracula-theme/vim
" colorscheme synthwave84
colorscheme jellybeans
" dbext connection strings
" let g:dbext_default_profile_psql = 'type=PGSQL:host=localhost:port=5432:dbname=omx_development:user=ramses'
" let g:dbext_default_profile = 'psql'
" load config file for coc
" source ~/.cocrc
" Remappings
nnoremap <leader>p :GFiles<CR>
nnoremap <leader>f :Files<CR>
nnoremap <leader>F :Locate ~<CR>
nnoremap <leader>b :Buffers<CR>
nnoremap <leader>a :Ag<CR>
nmap o o<esc>
nmap O O<esc>
" Remove trailing whitespace on save from certain files
autocmd FileType ruby,javascript,html,haml,coffee,php autocmd BufWritePre <buffer> %s/\s\+$//e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment