Skip to content

Instantly share code, notes, and snippets.

@SamuelDavis
Created April 29, 2023 21:05
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 SamuelDavis/e1030c5b3bbc75352b4df565b4152ea5 to your computer and use it in GitHub Desktop.
Save SamuelDavis/e1030c5b3bbc75352b4df565b4152ea5 to your computer and use it in GitHub Desktop.
vimrc
set title
" Styling
syntax on
colorscheme slate
" Search
set incsearch " incrementally highlight search while typing
" Sidebar
set number
set relativenumber
set scrolloff=8 " scrolling margin
" Indentation
set tabstop=4 " number of spaces a <Tab> takes up while rendering
set softtabstop=4 " number of spaces a <Tab> takes up while editing
set shiftwidth=4 " magic C-like language indenting depth
set expandtab " convert tabs to spaces
set smartindent " magically indent when going to a new line, includes preserving comments
" Plugins
call plug#begin()
" fuzzy-finder, invoked with :FZF
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
call plug#end()
" Hotkeys
nnoremap <C-P> :FZF<CR>
" Move highlighted code up/down
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment