Skip to content

Instantly share code, notes, and snippets.

@joshschmelzle
Last active December 10, 2019 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshschmelzle/4c8e4642ca6959ef2242a364ac4c7d4d to your computer and use it in GitHub Desktop.
Save joshschmelzle/4c8e4642ca6959ef2242a364ac4c7d4d to your computer and use it in GitHub Desktop.
basic vimrc
" global yanking with the OS clipboard
set clipboard=unnamed
" make the arrow keys do something useful, resize the viewports accordingly.
nnoremap <Left> :vertical resize +2<CR>
nnoremap <Right> :vertical resize -2<CR>
nnoremap <Up> :resize -2<CR>
nnoremap <Down> :resize +2<CR>
syntax on " enable syntax highlighting
set encoding=utf-8 " the encoding displayed
set fileencoding=utf-8 " encoding written to file
" Change color when entering insert mode
autocmd InsertEnter * highlight CursorLine ctermbg=lightblue ctermfg=Black
" Revert color to default when leaving insert mode
autocmd InsertLeave * highlight CursorLine ctermbg=None ctermfg=None
" make wildmenu behave like bash completion. finding commands are so easy now.
set wildmode=list:longest
set wildmenu " display all matching files
set path+=** " provides tab-completion for all file-related
set showcmd " show partial commands in the last line of the screen
set number " numbering
set confirm " raise dialogue asking if you wish to save file
set history=500 " set how many lines of history VIM has to remember
set autoread " set to auto read when a file is changed from the outside
set autoindent
" 4 spaces instead of tabs
set shiftwidth=4
set tabstop=4
set expandtab
colorscheme desert
syntax on
set nocompatible
set ruler
set visualbell
set encoding=utf-8
set wrap
set lazyredraw
set ruler
set backspace=indent,eol,start
set laststatus=2
set showmode
set hlsearch
set incsearch
set ignorecase
set smartcase
set showmatch
set t_Co=256
set background=dark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment