Skip to content

Instantly share code, notes, and snippets.

@consolewitch
Last active April 21, 2022 02:58
Show Gist options
  • Save consolewitch/10d316a72564ed75f3e5e71c7026453d to your computer and use it in GitHub Desktop.
Save consolewitch/10d316a72564ed75f3e5e71c7026453d to your computer and use it in GitHub Desktop.
vim configuration
" Set leader key for quick commands
let mapleader = " "
" encode "to sixty four" and "from sixty four"
vnoremap <leader>tsf c<c-r>=system('base64', @")<cr><esc>
vnoremap <leader>fsf c<c-r>=system('base64 --decode', @")<cr><esc>
" Show line numbers
set number
" Allow normal pasting
set paste
" Set NPC analogues for set list
set listchars=eol:¬,tab:>-,trail:█,extends:>,precedes:<
" Set folding the way I want
set foldmethod=indent
" Deal with word wrapping
set linebreak
set showbreak=+++
set textwidth=0
set wrapmargin=0
set ss=1
" Set tab to 4 true spaces
set tabstop=4
set shiftwidth=4
set expandtab
" Make formatting nicer
syntax on
" General
set paste
set showmatch
set hlsearch
set smartcase
set ignorecase
set incsearch
"set autoindent
"set smartindent
"set smarttab
"set softtabstop=4
set scrolloff=4
" Advanced
set ruler
set undolevels=1000
set backspace=indent,eol,start
" Backup and Swap
set backup
set backupdir=~/.vim/backup
set dir=~/.vim/swap
" Turn on crosshairs
set cursorline
set cursorcolumn
highlight CursorColumn ctermbg=darkgrey cterm=none
highlight CursorLine ctermbg=darkgrey cterm=none
" Nerdtree
" Uncomment the following to auto-start NERDTree
"autocmd VimEnter * NERDTree
map <leader>n :NERDTreeToggle<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment