Skip to content

Instantly share code, notes, and snippets.

@roberocity
Created September 19, 2021 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roberocity/6d055ea1f9d6275ec73632ed67ee8b9f to your computer and use it in GitHub Desktop.
Save roberocity/6d055ea1f9d6275ec73632ed67ee8b9f to your computer and use it in GitHub Desktop.
set history=500
filetype plugin on
filetype indent on
set autoread
au FocusGained,BufEnter * checktime
let $LANG='en'
set langmenu=en
set encoding=utf8
set ffs=unix,dos,mac
set wildmenu
set wildignore=*.o,*.dll,*.obj,*~,*.pyc,*/.git/*
set ruler
set cmdheight=1
set nu
set rnu
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
set ignorecase
set smartcase
set hlsearch
set noerrorbells
set novisualbell
set foldcolumn=1
syntax enable
color industry
set background=dark
set nocp
set nobackup
set nowb
set noswapfile
set expandtab
set smarttab
set tabstop=4
set shiftwidth=4
set ai
set si
set wrap
fun! CleanTrailingSpaces()
let p = getpos('.')
let q = getreg('/')
silent! %s/\s\+$//e
call setpos('.', p)
call setreg('/', q)
endfun
if has("autocmd")
autocmd BufWritePre *.txt,*.md,*.js,*.py,*.cs,*.c*.go :call CleanTrainingSpaces()
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment