Last active
November 12, 2016 02:16
-
-
Save RoryDungan/bd81c8089fd8b27783bb to your computer and use it in GitHub Desktop.
.vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Indentation | |
set smartindent | |
" set tabstop=2 | |
" set shiftwidth=2 | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set autoindent | |
" Enable autocompletion for file paths | |
set wildmode=list:longest,full | |
set wildmenu | |
" Highlight all instances of a pattern searched for | |
"set hlsearch | |
" Highlight the line the cursor is currently on | |
set cursorline | |
" Allow deletiion of newline characters with backspace (by default backspace will stop at the beginning/end of a line) | |
set backspace=indent,eol,start | |
" Show line numbers on to the left of text | |
set number | |
" Enable syntax highlighting | |
syntax on | |
" Word wrap | |
set wrap | |
set linebreak | |
set textwidth=0 | |
set wrapmargin=0 | |
set breakindent | |
" Make copy and paste work with the system clipboard | |
set clipboard=unnamed | |
" Easier movment between tabs and buffers | |
map <F7> :bn<CR> | |
map <F8> :bp<CR> | |
map <F9> :tabn<CR> | |
map <F10> :tabp<CR> | |
" Enable UTF-8 support for extended character sets | |
if has('multi_byte') | |
if &termencoding == "" | |
let &termencoding = &encoding | |
endif | |
set encoding=utf-8 | |
setglobal fileencoding=utf-8 | |
set fileencodings=ucs-bom,utf-8,latin1 | |
endif | |
if has('gui_running') | |
" Remove all unnecessary controls to maximise screen space | |
set guioptions=0 | |
" download and install twilight.vim for this to work | |
color twilight | |
" Hack to allow vim to display in fullscreen. Since this isn't built into vim you have to use an external program or library | |
if has('gui_gtk2') | |
map <F11> :call system("wmctrl -ir " . v:windowid . " -b toggle,fullscreen")<CR> | |
endif | |
if has('gui_win32') | |
" The default font in Windows vim is awful | |
set guifont=Consolas:h11:cANSI | |
map <F11> :call libcallnr("gvimfullscreen.dll", "ToggleFullScreen", 0)<CR> | |
endif | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment