Skip to content

Instantly share code, notes, and snippets.

@xsnpdngv
Last active March 6, 2017 20:49
Show Gist options
  • Save xsnpdngv/4637782a8a93985d20d0b036fd47a996 to your computer and use it in GitHub Desktop.
Save xsnpdngv/4637782a8a93985d20d0b036fd47a996 to your computer and use it in GitHub Desktop.
"set guifont=Monospace
set guifont=Consolas
"colorscheme desert
colorscheme darkblue
set columns=80 "number of columns
set lines=40 "number of lines
winpos 700 150 "window position
"set guioptions-=m "remove menu bar
set guioptions-=T "remove toolbar
set guioptions-=r "remove right-hand scroll bar
set guioptions-=L "remove left-hand scroll bar
" ==========================================================================
" File: .vimrc
" Maintainer: Tamas Dezso <dezso.t.tamas@gmail.com>
" Last Changed: March 6, 2017
" Version: 1.0
" ==========================================================================
" enable Vim specific settings (instead of vi compatible mode)
set nocompatible
" if X11 forwarding is active, then starting Vim would take long without it
set clipboard=exclude:.* "not to try connecting to the X server
" if autocommands are supported
if has("autocmd")
" enable file type detection, use the default filetype settings,
" so that mail gets 'tw' set to 72, 'cindent' is on in C files, etc.
" also load indent files to automatically do language-dependent indenting
filetype plugin indent on
" for all text files set 'textwidth' to 78 characters.
autocmd FileType text setlocal textwidth=78
else
set autoindent
endif
" when the terminal has colors
if &t_Co > 2 || has("gui_running")
syntax on " syntax highlight
set hlsearch " search pattern highlight
set incsearch " dynamic search pattern highlight
" overlength highlight (> 80)
highlight OverLength ctermbg=white ctermfg=red
match OverLength /\%81v.\+/
endif
set history=100 " keep 100 lines of command line history
set ruler " show cursor position all the time
set showcmd " display incomplete commands
set showmode " display mode
set nojoinspaces " use one space instead of two if joining lines
set encoding=utf-8 " set UTF-8 file encoding
set backspace=indent,eol,start " backspace to go over everything in insert mode
set tabstop=4 softtabstop=0 expandtab shiftwidth=4 smarttab " 4 space tab
" visualize tabs and trails (tab in command mode turns off/on)
set list listchars=tab:»\ ,trail:·
nnoremap <Tab> :set list!<CR>
" use indentation based folding (\ in command mode opens/closes fold)
set foldmethod=indent foldlevel=99
nnoremap \ za
" enable mouse in terminal emulators
if has('mouse')
set mouse=a
endif
" add command to convert to unix format
command ToUnix w ++ff=unix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment