Skip to content

Instantly share code, notes, and snippets.

@hellerbarde
Last active July 28, 2017 14:05
Show Gist options
  • Save hellerbarde/7772b500ae36b387a86bff14eec8ffdd to your computer and use it in GitHub Desktop.
Save hellerbarde/7772b500ae36b387a86bff14eec8ffdd to your computer and use it in GitHub Desktop.
so ~/.vim/sensible.vim
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=/Users/phil/.vim/dein.vim
" Required:
if dein#load_state('/Users/phil/.vim/bundles')
call dein#begin('/Users/phil/.vim/bundles')
" Let dein manage dein
" Required:
call dein#add('/Users/phil/.vim/dein.vim')
" Add or remove your plugins here:
call dein#add('vim-scripts/utl.vim') " UTL Plugin
call dein#add('tpope/vim-repeat')
call dein#add('vim-scripts/taglist.vim')
call dein#add('majutsushi/tagbar')
call dein#add('chrisbra/NrrwRgn')
call dein#add('mattn/calendar-vim')
call dein#add('inkarkat/vim-SyntaxRange')
" dependency of vim-orgmode
call dein#add('tpope/vim-speeddating')
call dein#add('/Users/phil/Git/vim-orgmode')
call dein#add('DAddYE/soda.vim')
call dein#add('nanotech/jellybeans.vim')
call dein#add('scrooloose/nerdcommenter')
call dein#add('scrooloose/nerdtree')
call dein#add('davidhalter/jedi-vim')
" Required:
call dein#end()
call dein#save_state()
endif
" Required:
filetype plugin indent on
syntax enable
" If you want to install not installed plugins on startup.
if dein#check_install()
call dein#install()
endif
"End dein Scripts-------------------------
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set expandtab
set shiftwidth=4
set tabstop=4
set smarttab
set lbr
set tw=500
set ai "Auto indent
set si "Smart indet
set wrap "Wrap lines
""""
" Plugin Settings
""""
let g:org_export_emacs="~/.local/bin/emacs"
"""
" Shortcuts
"""
nnoremap <F9> :TagbarToggle<CR>
nnoremap <F12> :NERDTreeToggle<CR>
nnoremap <leader>sv :source $MYVIMRC<CR>
nnoremap <leader>ev :call EditVimrc()<CR>
inoremap <C-a> <ESC>I
inoremap <C-e> <ESC>A
inoremap <leader>> <ESC>:py3 ORGMODE.plugins[u"EditStructure"].demote_heading(including_children=False)<CR>a
inoremap <leader>< <ESC>:py3 ORGMODE.plugins[u"EditStructure"].promote_heading(including_children=False)<CR>a
nnoremap <leader>> <ESC>:py3 ORGMODE.plugins[u"EditStructure"].demote_heading(including_children=False)<CR>a
nnoremap <leader>< <ESC>:py3 ORGMODE.plugins[u"EditStructure"].promote_heading(including_children=False)<CR>a
inoremap <leader>. <ESC>:py3 ORGMODE.plugins[u"EditStructure"].demote_heading(including_children=False)<CR>a
inoremap <leader>, <ESC>:py3 ORGMODE.plugins[u"EditStructure"].promote_heading(including_children=False)<CR>a
nnoremap <leader>. <ESC>:py3 ORGMODE.plugins[u"EditStructure"].demote_heading(including_children=False)<CR>a
nnoremap <leader>, <ESC>:py3 ORGMODE.plugins[u"EditStructure"].promote_heading(including_children=False)<CR>a
nnoremap <D-/> :call NERDComment('n', 'Toggle')<CR>
vnoremap <D-/> :call NERDComment('n', 'Toggle')<CR>
vnoremap <D-?> :call NERDComment('n', 'Minimal')<CR>
inoremap <D-/> <ESC>:call NERDComment('n', 'Toggle')<CR>a
" Just to remind me how functions are declared ;)
function! Meow()
echom "Meow!"
endfunction
function! EditVimrc()
split $MYVIMRC
"echom "edit .vimrc!!"
endfunction
colorscheme jellybeans
if has("gui_running")
set guioptions+=T
" for MacOS
set gfn=Monaco:h14
set shell=/bin/bash
else
endif
" General Config
" make sure the current directory is always where the open file is.
" autocmd BufEnter * lcd %:p:h
" Tagbar Config
let g:tagbar_iconchars = ['', '']
let g:tagbar_sort = 0
let g:tagbar_autofocus = 0
let g:tagbar_indent = 1
let g:tagbar_singleclick = 1
let g:tagbar_type_markdown = {
\ 'ctagstype': 'markdown',
\ 'ctagsbin' : 'markdown2ctags.py',
\ 'ctagsargs' : '-f - --sort=yes',
\ 'kinds' : [
\ 's:sections',
\ 'i:images'
\ ],
\ 'sro' : '|',
\ 'kind2scope' : {
\ 's' : 'section',
\ },
\ 'sort': 0,
\ }
let g:tagbar_type_mkd = {
\ 'ctagstype': 'mkd',
\ 'ctagsbin' : 'markdown2ctags.py',
\ 'ctagsargs' : '-f - --sort=yes',
\ 'kinds' : [
\ 's:sections',
\ 'i:images'
\ ],
\ 'sro' : '|',
\ 'kind2scope' : {
\ 's' : 'section',
\ },
\ 'sort': 0,
\ }
"Orgmode configs
let g:org_heading_highlight_colors = ['PreProc', 'Identifier', 'Constant', 'Statement', 'Title', 'Type']
let g:org_heading_highlight_levels = 18
let g:org_indent = 1
let g:org_todo_keywords=[['TODO(t)', 'FEEDBACK(f)', 'OVERDUE(o)', 'INPROGRESS(i)', '|', 'DONE(d)', 'DELEGATED(e)', 'REJECTED(r)'], ['INFO(I)'], ['PROBLEM(p)']]
let g:org_todo_keyword_faces = [['TODO', 'red'],
\ ['FEEDBACK', 'cyan'],
\ ['OVERDUE', 'red'],
\ ['INPROGRESS', 'yellow'],
\ ['DONE', 'green'],
\ ['DELEGATED', 'green'],
\ ['REJECTED', 'yellow'],
\ ['INFO', 'cyan'],
\ ['PROBLEM', 'red']]
" some examples I can't get working.
" [':foreground white', ':background red']]]
" \ ['CANCELED',
" \ [':foreground red', ':background black', ':weight bold',
" \ ':slant italic', ':decoration underline']]]
"filetype plugin indent on
" sensible.vim - Defaults everyone can agree on
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 1.1
if exists('g:loaded_sensible') || &compatible
finish
else
let g:loaded_sensible = 'yes'
endif
if has('autocmd')
filetype plugin indent on
endif
if has('syntax') && !exists('g:syntax_on')
syntax enable
endif
" Use :help 'option' to see the documentation for the given option.
set autoindent
set backspace=indent,eol,start
set complete-=i
set smarttab
set nrformats-=octal
if !has('nvim') && &ttimeoutlen == -1
set ttimeout
set ttimeoutlen=100
endif
set incsearch
" Use <C-L> to clear the highlighting of :set hlsearch.
if maparg('<C-L>', 'n') ==# ''
nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
endif
set laststatus=2
set ruler
set wildmenu
if !&scrolloff
set scrolloff=1
endif
if !&sidescrolloff
set sidescrolloff=5
endif
set display+=lastline
if &encoding ==# 'latin1' && has('gui_running')
set encoding=utf-8
endif
if &listchars ==# 'eol:$'
set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
endif
if v:version > 703 || v:version == 703 && has("patch541")
set formatoptions+=j " Delete comment character when joining commented lines
endif
if has('path_extra')
setglobal tags-=./tags tags-=./tags; tags^=./tags;
endif
if &shell =~# 'fish$' && (v:version < 704 || v:version == 704 && !has('patch276'))
set shell=/bin/bash
endif
set autoread
if &history < 1000
set history=1000
endif
if &tabpagemax < 50
set tabpagemax=50
endif
if !empty(&viminfo)
set viminfo^=!
endif
set sessionoptions-=options
" Allow color schemes to do bright colors without forcing bold.
if &t_Co == 8 && $TERM !~# '^linux\|^Eterm'
set t_Co=16
endif
" Load matchit.vim, but only if the user hasn't installed a newer version.
if !exists('g:loaded_matchit') && findfile('plugin/matchit.vim', &rtp) ==# ''
runtime! macros/matchit.vim
endif
inoremap <C-U> <C-G>u<C-U>
" vim:set ft=vim et sw=2:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment