Skip to content

Instantly share code, notes, and snippets.

@ak47
Last active October 7, 2020 21:20
Show Gist options
  • Save ak47/db9a0688c0c8adee9ec51ad744d3e9a8 to your computer and use it in GitHub Desktop.
Save ak47/db9a0688c0c8adee9ec51ad744d3e9a8 to your computer and use it in GitHub Desktop.
syntax on
colo murphy
set nu
set tabstop=8 softtabstop=0 expandtab shiftwidth=2 smarttab
set ignorecase
set backspace=indent,eol,start
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" 1 tab == 2 spaces
set shiftwidth=2
set tabstop=2
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
" Always show the status line
set laststatus=2
" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Returns true if paste mode is enabled
function! HasPaste()
if &paste
return 'PASTE MODE '
endif
return ''
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment