Skip to content

Instantly share code, notes, and snippets.

@Skyb0rg007
Last active February 10, 2025 22:54
Show Gist options
  • Save Skyb0rg007/56a03ffcea699fc4123c3910c8e2994d to your computer and use it in GitHub Desktop.
Save Skyb0rg007/56a03ffcea699fc4123c3910c8e2994d to your computer and use it in GitHub Desktop.
Windows Vim Config
" vim: set ft=vim:
" Directory setup: move everything to $APPDATA\Vim and $LOCALAPPDATA\Vim
set backupdir=$LOCALAPPDATA\Vim\backup
set directory=$LOCALAPPDATA\Vim\swap
set undodir=$LOCALAPPDATA\Vim\undo
set viewdir=$LOCALAPPDATA\Vim\view
set viminfofile=$LOCALAPPDATA\Vim\viminfo
set packpath=$APPDATA\Vim,$VIM\vimfiles,$VIMRUNTIME
let g:netrw_home=expand("$LOCALAPPDATA\\Vim")
set runtimepath=$APPDATA\Vim,$VIM\vimfiles,$VIMRUNTIME,$VIM\vimfiles\after,$APPDATA\Vim\after
call mkdir(&backupdir, 'p')
call mkdir(&directory, 'p')
call mkdir(&undodir, 'p')
call mkdir(&viewdir, 'p')
let &shell=exepath("pwsh.exe")
syntax enable
filetype on
filetype indent on
filetype plugin on
set background=dark
colorscheme darkblue
set autoindent " Copy indent from current line when starting a new line
set autoread " Re-read a file when a change occurs
set backspace=indent,eol,start " Allow backspacing over everything
set complete=".,w,b,u,t" " Completes by looking at (loaded & unloaded) buffers, windows, tags
set display+=lastline " Show the last line as much as possible
" set encoding=utf-8 " Force UTF-8
set expandtab " Tabs are replaced by spaces
set formatoptions="tcqj" " Auto-wrap text and comments, gq formats comments, remove comment when joining lines
set hlsearch " Highlight the search
set incsearch " Show search results incrementally
set laststatus=2 " Always show status
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+ " How to display non-print chars
set mouse=a " Allow full mouse integration
set nowrap " No line wrapping
set nrformats-=octal " <C-A> doesn't recognize octal constants
" set ruler " Show line+column in the bottom right
set scrolloff=1 " Cursor is 1 line from top/bottom
set shiftwidth=4 " '>' is 4 spaces
set sidescrolloff=5 " Cursor is 5 rows from left/right
set smarttab " Tab inserts spaces up to the tab stop
set timeoutlen=1000 ttimeoutlen=0 " Don't wait after i_CTRL-[
set tabstop=4 " Tabs are 4 spaces by default
set textwidth=0 wrapmargin=0 " Don't auto-insert newlines
set wildmenu " Completion is enhanced
set wildmode=full " Complete the next full match
" set colorcolumn=80 " Highlight the 80th column
set hidden " Allows you to close a dirty buffer without saving
set exrc secure " Allow for a local .vimrc to override these settings
set splitright " Split below and to the right
" set t_Co=256 " Number of colors
set visualbell " Disable alarm
" set path=.,/usr/include/,/usr/include/x86_64-linux-gnu/,,
set spelllang=en_us
set number
let g:vim_json_warnings=0
runtime ftplugin/man.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment