Skip to content

Instantly share code, notes, and snippets.

@hypest
Created August 14, 2025 06:04
Show Gist options
  • Save hypest/863b8a899ad2e9dfb29ad583a95c2dcc to your computer and use it in GitHub Desktop.
Save hypest/863b8a899ad2e9dfb29ad583a95c2dcc to your computer and use it in GitHub Desktop.
vimrc
filetype plugin indent on
set tabstop=2
set shiftwidth=2
set expandtab
set laststatus=2
set pastetoggle=<F2>
"set so=999
set viminfo='1000,:1000
set statusline=%F%m%r%h%w\ \ \ \ [TYPE=%Y]\ [ASC=\%03.3b]\ [HEX=\%02.2B]\ [LEN=%L]\ [CH\ %o]\ [L\ %l,\ C\ %v]
syntax on
colorscheme ir_black
function! ResetTitle()
" disable vim's ability to set the title
exec "set title t_ts='' t_fs=''"
" and restore it to 'bash'
exec ":!echo -e '\033kbash\033\\'\<CR>"
endfunction
au VimLeave * silent call ResetTitle()
let &titlestring = "vi[" . expand("%:t") . "]"
set t_ts=ESCk
set t_fs=ESC\
set title
autocmd BufEnter * lcd %:p:h
" now set it up to change the status line based on mode
if version >= 700
au InsertEnter * hi StatusLine term=reverse ctermbg=5 gui=undercurl guisp=Magenta
au InsertLeave * hi StatusLine term=reverse ctermfg=Grey ctermbg=DarkGrey gui=bold,reverse
endif
nnoremap <buffer> <F9> :exec '!python' shellescape(@%, 1)<cr>
nmap =j :%!python -m json.tool<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment