Skip to content

Instantly share code, notes, and snippets.

@lightscalar
Created July 29, 2017 21:30
Show Gist options
  • Save lightscalar/b1a1a61250f810f9cb5c6da653389bc5 to your computer and use it in GitHub Desktop.
Save lightscalar/b1a1a61250f810f9cb5c6da653389bc5 to your computer and use it in GitHub Desktop.
" Here are the basics.
imap jk <ESC>
" nnoremap <Leader>w <ESC>:w<CR>
set number
set relativenumber
set shell=bash\ -l " vim shell should behave like my usual shell.
set noswapfile " Get rid of these things; big problems.
map <Leader>] :noh <CR>
map <Leader>[ :StripWhitespace <CR>
map <Space>w :w <CR>
set visualbell
set t_vb=
nnoremap <Leader>w gqip
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
" Better window navigation! Use the arrow keys!
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Quickly list and navigate buffers.
nnoremap gp :bp<CR>
nnoremap gn :bn<CR>
nnoremap gl :ls<CR>
" How are we going to color the position of the cursor, current line, etc.
let &colorcolumn=join(range(81,81),",")
highlight ColorColumn ctermbg=254 guibg=#efefef
highlight LineNr ctermbg=252
set cursorline
hi CursorLine term=bold cterm=bold ctermbg=255
syntax enable
" Specify a directory for plugins.
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-surround'
Plug 'ervandew/supertab'
Plug 'google/vim-colorscheme-primary'
Plug 'tpope/vim-vinegar'
Plug 'SirVer/ultisnips'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'ntpeters/vim-better-whitespace'
Plug 'godlygeek/tabular'
Plug 'plasticboy/vim-markdown'
Plug 'christoomey/vim-tmux-navigator'
Plug 'posva/vim-vue'
Plug 'blueyed/vim-diminactive'
call plug#end()
" How about a color scheme? Using Google's, for the moment.
set t_Co=256
set background=light
colorscheme primary
" Highlight trailing whitespace in our files.
highlight ExtraWhitespace ctermbg=128
" Set UltiSnip directories.
let g:UltiSnipsSnippetDirectories = ['~/.vim/UltiSnips', 'UltiSnips']
let g:UltiSnipsExpandTrigger= "<Leader><Leader>"
" let g:markdown_fenced_languages = ['markdown=md']
filetype plugin indent on
filetype plugin on
set laststatus=2
set ttimeoutlen=50
autocmd FileType html setlocal shiftwidth=2 tabstop=2
autocmd FileType javascript setlocal shiftwidth=2 tabstop=2
autocmd FileType vue setlocal shiftwidth=2 tabstop=2
let g:diminactive_use_colorcolumn = 1
let g:closetag_filenames = "*.html,*.xhtml,*.phtml,*.vue"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment