Skip to content

Instantly share code, notes, and snippets.

@makruger
Created March 6, 2016 05:50
Show Gist options
  • Select an option

  • Save makruger/40e3b4fffd8ee88705e0 to your computer and use it in GitHub Desktop.

Select an option

Save makruger/40e3b4fffd8ee88705e0 to your computer and use it in GitHub Desktop.
"************************************************************
"/home/mike/.vimrc - VIM Configuration file
"************************************************************
"Created on 01-16-2016 to add plugins via Vundle
"OS = Linux Mint 17.2 KDE 64-bit (Rafaela)
"************************************************************
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.
" plugin on GitHub repo
"Plugin 'tpope/vim-fugitive'
" plugin from http://vim-scripts.org/vim/scripts.html
"Plugin 'L9'
" Git plugin not hosted on GitHub
"Plugin 'git://git.wincent.com/command-t.git'
" git repos on your local machine (i.e. when working on your own plugin)
"Plugin 'file:///home/gmarik/path/to/plugin'
" The sparkup vim script is in a subdirectory of this repo called vim.
" Pass the path to set the runtimepath properly.
"Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}
" Avoid a name conflict with L9
"Plugin 'user/L9', {'name': 'newL9'}
"
Plugin 'SuperTab'
"
Plugin 'vim-creole'
"
Plugin 'surround.vim'
"
Plugin 'Rykka/riv.vim'
"
Plugin 'Rykka/InstantRst'
"
Plugin 'Colour-Sampler-Pack'
"
Plugin 'dagwieers/asciidoc-vim'
"
"Plugin 'autoclose.vim'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"************************************************
"My Personal Customizations - December 8, 2015
"************************************************
"let g:SuperTabDefaultCompletionType = "context"
highlight Pmenu guibg=brown gui=bold
syntax on
color vividchalk
set number
"set spell spelllang=en_us
set listchars=eol:$,tab:\ \
match ErrorMsg /\%>73v.\+/
match ErrorMsg /[^\t]\zs\t\+/
set statusline=%F%m%r%h%w\ [Format=%{&ff}]\ [Type=%y]\ [LEN=%L]
set laststatus=2
"" Fold Asciidoc files at sections and using nested folds for subsections
" compute the folding level
function! AsciidocLevel()
if getline(v:lnum) =~ '^== .*$'
return ">1"
endif
if getline(v:lnum) =~ '^=== .*$'
return ">2"
endif
if getline(v:lnum) =~ '^==== .*$'
return ">3"
endif
if getline(v:lnum) =~ '^===== .*$'
return ">4"
endif
if getline(v:lnum) =~ '^====== .*$'
return ">5"
endif
if getline(v:lnum) =~ '^======= .*$'
return ">6"
endif
return "="
endfunction
" run the folding level method when asciidoc is here
autocmd Syntax asciidoc setlocal foldexpr=AsciidocLevel()
" enable folding method: expression on asciidoc
autocmd Syntax asciidoc setlocal foldmethod=expr
" start with text unfolded all the way
autocmd BufRead *.adoc normal zR
autocmd BufRead *.asciidoc normal zR
" TODO following does not work as folding is lost up reloading
" autocmd Syntax asciidoc normal zR
"************************************************
"End of Personal Customizations
"************************************************
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment