Skip to content

Instantly share code, notes, and snippets.

@saimonmoore
Created February 25, 2010 12:44
Show Gist options
  • Select an option

  • Save saimonmoore/314514 to your computer and use it in GitHub Desktop.

Select an option

Save saimonmoore/314514 to your computer and use it in GitHub Desktop.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set langmenu=none "Set all the menu's to use English
colorscheme delph "Use custom colour scheme
if has("autocmd")
filetype plugin indent on "Load filetype specific plugins and indent file
endif
set nomodeline "Exploitable, should be off
set nocompatible "Turn off vi compatibility
set ruler "Show cursor position
set hidden "Don't force me to save before changing buffers
set list "Show hidden characters
set listchars=tab:>-,trail:@ "What to show instead of characters
set clipboard+=unnamed "Let me paste directly from Windows clipboard
set lazyredraw "Don't update screen during macro's, etc.
if has("mouse")
set mouse=a "Allow mouse in all modes except insert
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Edit options "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set bs=indent,eol,start "Turn on backspace in insert mode
set textwidth=79 "Maximum linewidth
set wildmenu "Show all auto-completion options
" Tab specific option
set tabstop=8 "A tab is 8 spaces
set expandtab "Always uses spaces instead of tabs
set softtabstop=4 "Insert 4 spaces when tab is pressed
set shiftwidth=4 "An indent is 4 spaces
set smarttab "Indent instead of tab at start of line
set shiftround "Round spaces to nearest shiftwidth multiple
set nojoinspaces "Don't convert spaces to tabs
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Search options "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set ignorecase "Turn of case sensitivity
set smartcase "Only enable above for strings in all lowercase
set incsearch "Search while typing query
if &t_Co > 2 || has("gui_running")
set hlsearch "Highlight all search matches if color is
endif "possible (:noh to toggle off)
"Remap return key to toggle highlight off when pressing enter in command mode.
nnoremap <return> :noh<return>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Programming options "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if &t_Co > 2 || has("gui_running")
syntax on "Turn on syntax highlighting
let python_highlight_all= 1 "Enable highlighting all python syntax
endif
" Folding options
if version >= 600
set foldenable "Enable folding if available
set foldmethod=syntax "Fold on syntax
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Miscellaneous options "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("autocmd")
autocmd BufEnter * cd %:p:h "Set pwd to directory of the current file
endif
if &t_Co > 2 || has("gui_running") "Match characters past column 79 to mark
match LineTooLong /\%>79v.\+/ "as red.
endif
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GUI options "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if has("gui_running")
set guifont=Courier_New:h11:cDEFAULT
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment