Skip to content

Instantly share code, notes, and snippets.

@vdeemann
Last active February 26, 2026 16:08
Show Gist options
  • Select an option

  • Save vdeemann/72d169d5860a735c872048b352c316e7 to your computer and use it in GitHub Desktop.

Select an option

Save vdeemann/72d169d5860a735c872048b352c316e7 to your computer and use it in GitHub Desktop.
colorscheme default
" Set line numbers
:set number
:set relativenumber
" Highlight searches
set hlsearch
" :noh to clear highlighting
" Enable setting the terminal title
set title
" Update the terminal title automatically when switching files/buffers
" This autocmd ensures that every time you switch buffers or enter a new one (e.g., using :find, :e, :bnext, etc.), the titlestring is updated with just the filename (%:t) of the current buffer.
autocmd BufEnter * let &titlestring = expand("%:t")
" You can also customize the titlestring further, e.g., to include the full path:
" autocmd BufEnter * let &titlestring = expand("VIM: %F")
execute pathogen#infect()
" Enable syntax highlighting
syntax on
" Enables filetype detection, loads ftplugin, and loads indent
" (Not necessary on nvim and may not be necessary on vim 8.2+)
filetype plugin indent on
" https://stackoverflow.com/questions/15123477/tmux-tabs-with-name-of-file-open-in-vim
"autocmd VimLeave * call system("tmux rename-window bash")
" https://stackoverflow.com/a/4111704/8706936
"set laststatus=2
"set statusline=%f
" https://shapeshed.com/vim-netrw/
" Netrw settings
" Use :Lexplore
let g:netrw_banner = 0
let g:netrw_liststyle = 3
let g:netrw_browse_split = 4
let g:netrw_altv = 1
let g:netrw_winsize = 25
let g:netrw_list_hide = &wildignore
" Fuzzy file search
set path+=**
"set wildmenu
" Tell Vim where to look for tags (search current dir then move up)
set tags=./tags;,tags;
" Use Tab to cycle through the completion menu instead of Ctrl-n/p
"inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment