public
Created

my vimrc

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
" pvinis
 
""" Intro
 
set nocompatible " viMproved
 
" Needed for vundle, will be turned on after vundle inits
filetype off
 
" Setup vundle
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
 
""" Vundle Config
" Switch between companion files
Bundle 'derekwyatt/vim-fswitch'
"""" na do an exoun git osa exo sketa
"Bundle 'FuzzyFinder' """""""""""
Bundle 'Lokaltog/vim-easymotion'
"""""
" Status line
Bundle 'Lokaltog/vim-powerline'
Bundle 'Raimondi/delimitMate'
""""""
" Rename current file
Bundle 'danro/rename.vim'
" Detects syntactical errors
Bundle 'scrooloose/syntastic'
Bundle 'SirVer/ultisnips'
"""" UltiSnips is missing a setf trigger for snippets on BufEnter
""""autocmd vimrc BufEnter *.snippets setf snippets
""""
Bundle 'Valloric/ListToggle'
"""""
Bundle 'Valloric/MatchTagAlways'
""""""
""vim=indend=lines
""vim-instant-markdown
Bundle 'Valloric/vim-operator-highlight'
""""
Bundle 'Valloric/YouCompleteMe'
Bundle 'YankRing.vim'
""""
Bundle 'anyakichi/vim-surround'
""""
Bundle 'nathanaelkane/vim-indent-guides'
Bundle 'godlygeek/tabular'
""""
" Shows tags
Bundle 'majutsushi/tagbar'
Bundle 'matchit.zip'
""""
Bundle 'tpope/vim-repeat'
""""
Bundle 'xolox/vim-session'
""""
" Sidebar
Bundle 'scrooloose/nerdtree'
Bundle 'sjl/gundo.vim'
"""""
" Better search
Bundle 'mileszs/ack.vim'
" Matrix Screensaver, because why not?
Bundle 'uguu-org/vim-matrix-screensaver'
Bundle 'tpope/vim-fugitive'
"""""
Bundle 'tpope/vim-markdown'
"""""
""""""Bundle 'suan/vim-instant-markdown'
Bundle 'mkitt/markdown-preview.vim'
Bundle 'vim-ruby/vim-ruby'
Bundle 'tpope/vim-rails'
Bundle 'kchmck/vim-coffee-script'
Bundle 'slim-template/vim-slim'
Bundle 'kien/ctrp.vim'
"""""
Bundle 'chriskempson/vim-tomorrow-theme'
Bundle 'jnwhiteh/vim-golang'
""""" na valo ena search gia ola ta sxolia ///, ##, klp
 
""" Important Settings
filetype plugin indent on " automatically detect file types
 
 
""" General Settings
"" Display
colorscheme Tomorrow-Night-Eighties
set guifont=Anonymous\ Pro\ for\ Powerline:h14
syntax on " enable syntax
set scrolloff=5 " 5 lines above/below cursor when scrolling
set showmatch " show matching bracket
set showcmd " show partial command on bottom right corner
set ruler " show cursor position in status bar
set laststatus=2 " always show status line
set number " show line numbers
set numberwidth=3 " size of gutter
set cursorline " highlight current line
set list " show non-printable characters
set listchars=tab:▸\ ,trail:·
set nowrap
set textwidth=80 " look below
set colorcolumn=+1 " highlight column 81
set formatoptions-=tc "
set shortmess=at " shorten messages
 
" Match/Search
set hlsearch " highlight search
set incsearch " incremental search
set ignorecase " case insensitive
set smartcase " case sensitive when there is a capital letter in the search
 
" Indentation
set autoindent " on new lines, match indent of previous line
set copyindent " copy the previous indentation on autoindenting
set cindent " smart indenting for c-like code
set smarttab """""""""
set tabstop=4 " tab size
set shiftwidth=4 """"" an kanou visual block kai patiso tab?
set shiftround """"""
 
" Tab-Completion
set wildmenu
set wildmode=longest,full " first tab: complete longest, second tab: full
" set completeopt=menu,menuone,longest """"""""""
 
"" Backup
set undofile
set undodir=~/.vim/undo
set undolevels=1000
set nobackup " no backup~ files
set dir=~/.vim-tmp " for swap files
set history=1000 " command history
 
" Editor
set backspace=indent,eol,start " allow backspacing over everything
set whichwrap+=<,>,h,l
 
" Buffers
set autoread " refresh file if changed
set tags=./tags;/ """"""""
 
 
""" Mappings
let mapleader=','
noremap ; :
noremap : ;
" turn off highlight from a search
noremap <leader>/ :nohls<CR>
" fast save
nnoremap <leader>w :w<CR>
" duplicate above line
noremap <leader>p kYp
" scroll one page up/down with space
noremap <space> <PageDown>
noremap <s-space> <PageUp>
" bring up .vimrc
noremap <leader>v :sp ~/.vimrc<CR>
" reload .vimrc
noremap <silent> <leader>V :so ~/.vimrc<CR>:exe ":echo 'vimrc reloaded'"<CR>
" sudo save if file is opened without sudo
cnoremap w!! w !sudo tee % >/dev/null
" add a line above/below current line. cursor stays there.
nnoremap <silent> zj o<ESC>k
nnoremap <silent> zk O<ESC>j
" easier command history up and down. also, q:
cnoremap <c-j> <down>
cnoremap <c-k> <up>
" quickly move between windows
""""""""" use it
noremap <leader>h <c-w>h
noremap <leader>j <c-w>j
noremap <leader>k <c-w>k
noremap <leader>l <c-w>l
" move to previous window
noremap <leader>. <c-w>p
" spelling shortcuts
" ]s: next misspelled word
" [s: previous misspelled word
" sa: add to dict
" ]u: get suggestions
noremap ]o z=
""noremap <leader>sp [s
"noremap <leader>sa zg
""""noremap <leader>su z=
" shifting indent with < and > when in visual mode, it exits. now it doesn't
vnoremap < <gv
vnoremap > >gv
" project search
noremap <leader>f :Ack<space>
 
 
""" Plugin Settings Powerline
"" NERDTree
" ,' to open/focus
" ,\ to close
nnoremap <leader>' :NERDTreeFocus<CR>
nnoremap <leader>\ :NERDTreeClose<CR>
 
"" vim-golang
set rtp+=$GOROOT/misc/vim
"""""" to xreiazomai?
 
"" Powerline
let g:Powerline_symbols='fancy'
 
"" syntastic
let g:syntastic_error_symbol='✗'
let g:syntastic_warning_symbol='⚠'
" check for errors when opening a file, as well as when it's saved
let g:syntastic_check_on_open=1
" jump to first error when opening a file, as well as when it's saved
let g:syntastic_auto_jump=1
" open location list with errors
let g:syntastic_auto_loc_list=1
 
"" tagbar
" show tags as they are in the file
let g:tagbar_sort=0
" single click goes to function
let g:tagbar_singleclick=1
let g:tagbar_iconchars = ['+', '-']
" unfold to show tag of current function
let g:tagbar_autoshowtag=1
 
"" YouCompleteMe
let g:ycm_key_list_previous_completion=['<Up>']
 
"" Ultisnips
let g:UltiSnipsExpandTrigger="<c-tab>"
let g:UltiSnipsListSnippets="<c-s-tab>"
 
"" Indent Guides
let g:indent_guides_guide_size=1
let g:indent_guides_space_guides=1
let g:indent_guides_enable_on_vim_startup=1
 
 
""" FileType Specifics
 
" no cindent on text and md files, so that text inside parenthesis works
autocmd FileType text,markdown call SetTextOptions()
function! SetTextOptions()
setlocal nocindent
setlocal spell spelllang=en_us
setlocal wrap
"""""""set formatoptions and check help
setlocal linebreak
setlocal nolist
endfunction
 
" when opening .slim, turn syntax for coffee as well
autocmd FileType slim set filetype=slim.coffee
 
""" Testing
autocmd BufWritePost *.md,*.markdown :silent !cat %:p | curl -X PUT -T - http://localhost:8090/

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.