Skip to content

Instantly share code, notes, and snippets.

@gsw945
Last active November 14, 2025 07:37
Show Gist options
  • Select an option

  • Save gsw945/78044a87fea7719ad686bee56ac13f6b to your computer and use it in GitHub Desktop.

Select an option

Save gsw945/78044a87fea7719ad686bee56ac13f6b to your computer and use it in GitHub Desktop.
`~/.vimrc`
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
" Highlight current line
set cursorline
" display line number
set number
" filemode
set fileformat=unix
" autoindent
set autoindent
" paste
" set paste
" set nopaste
" pressing F12 toggles paste on and off
set pastetoggle=<F12>
" jump to the last position when reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
@gsw945
Copy link
Author

gsw945 commented May 21, 2021

enforce

:source ~/.vimrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment