Skip to content

Instantly share code, notes, and snippets.

@palozano
Last active March 27, 2021 21:35
Show Gist options
  • Save palozano/21583e815efde2f7a9fcabe1ccd1d112 to your computer and use it in GitHub Desktop.
Save palozano/21583e815efde2f7a9fcabe1ccd1d112 to your computer and use it in GitHub Desktop.
Minimal but functional Vim configuration without plugins
set nocompatible
syntax enable
filetype plugin on
set path+=**
set wildmenu
set encoding=utf-8
set listchars=trail:.,tab:>\ ,eol:$
set lazyredraw
set laststatus=2
set incsearch nohlsearch
set number
set backspace=indent,eol,start
set nostartofline
set autoread
set scrolloff=3
set nocursorline
set ignorecase smartcase
set showmode showcmd
set shortmess+=I
set hidden
set history=1000
set complete-=i completeopt=menu
set splitright splitbelow
set winwidth=80
set display+=lastline
set ttimeoutlen=50
set switchbuf=useopen
set ruler
set backup
set bex=+
set lbr
set ai
set si
set guifont=Lucida_Console:h12
set noeb vb t_vb=
set guioptions-=T
" Tag jumping:
" Create the `tags` file (may need to install ctags first)
"command! MakeTags !ctags -R .
" Now we can:
" - Use ^] to jump to tag under cursor
" - Use g^] for ambiguous tags
" - Use ^t to jump back up the tag stack
" Autocomplete:
" The good stuff is documented in |ins-completion|
" - ^x^n for JUST this file
" - ^x^f for filenames (works with our path trick!)
" - ^x^] for tags only
" - ^n for anything specified by the 'complete' option
" Now we can:
" - Use ^n and ^p to go back and forth in the suggestion list
" File browsing:
let g:netrw_banner=0 " disable annoying banner
let g:netrw_browse_split=4 " open in prior window
let g:netrw_altv=1 " open splits to the right
let g:netrw_liststyle=3 " tree view
let g:netrw_list_hide=netrw_gitignore#Hide()
let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+'
" - :edit a folder to open a file browser
" - <CR>/v/t to open in an h-split/v-split/tab
" - check |netrw-browse-maps| for more mappings
" Snippets:
" Read an empty HTML template and move cursor to title
"nnoremap ,html :-1read $HOME/.vim/.skeleton.html<CR>3jwf>a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment