-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
133 lines (114 loc) · 4.34 KB
/
vimrc
File metadata and controls
133 lines (114 loc) · 4.34 KB
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
" To disable a plugin, add it's bundle name to the following list
let g:pathogen_disabled = ['autotag']
" run pathogen stuff first
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
" pull in local vim files
source $HOME/.vimrclocal.vim
source $HOME/.vim/plugin/myFunctions.vim
" define the ctags file
set tags+=$HOME/.tags
" use the Solarized colour skeme
set background=dark
let g:solarized_termtrans = 1
colorscheme solarized
" bash like filename completion
set wildmode=longest:full
set wildmenu
" set up SuperTab to play nicely
let g:SuperTabDefaultCompletionType = "context"
" setup the custom supercollider ctags stuff
" let tlist_supercollider_settings='supercollider;c:class name;m:class methods;i:instance methods;v:variables'
" Key mappings -----------------------------
let mapleader=","
set backspace+=indent,eol,start
" ,be to open buffexplorer
nmap <leader>be :BufExplorer<CR>
" ,tl to toggle Taglist
nmap <leader>tl :TlistToggle<CR>
" ,sc to start sc
nmap <leader>sc :SClangStart<CR>
" ,sk to kill sc
nmap <leader>sk :SClangKill<CR>
" ,sr to recompile sc
nmap <leader>sr :SClangRecompile<CR>
" ,w- to maximise a window
nmap <leader>w- <C-W>_
" ,w= to equalise all windows
nmap <leader>w= <C-W>=
" ,mf make format
nmap <leader>mf :call MyMaker("format")<CR>
" ,mv make valid
nmap <leader>mv :call MyMaker("valid")<CR>
" ,mh make html
nmap <leader>mh :call MyMaker("html")<CR>
" Navigate between windows using ctrl+arrows
map <C-UP> <C-W><C-UP>
map <C-DOWN> <C-W><C-DOWN>
map <C-LEFT> <C-W><C-h>
map <C-RIGHT> <C-W><C-l>
" Navigate between prev / next buffer using shift left / right
map <S-LEFT> :bprevious<CR>
map <S-RIGHT> :bnext<CR>
"VimOrganizer Stuff
let g:ft_ignore_pat = '\.org'
au! BufRead,BufWrite,BufWritePost,BufNewFile *.org
au BufEnter *.org call org#SetOrgFileType()
" let g:org_capture_file = '~/org_files/mycaptures.org'
command! OrgCapture :call org#CaptureBuffer()
command! OrgCaptureFile :call org#OpenCaptureFile()
"==============================================================
" THE UNNECESSARY STUFF
"==============================================================
" Everything below here is a customization. None are needed.
"==============================================================
" The variables below are used to define the default Todo list and
" default Tag list. Both of these can also be defined
" on a document-specific basis by config lines in a file.
" See :h vimorg-todo-metadata and/or :h vimorg-tag-metadata
" 'TODO | DONE' is the default, so not really necessary to define it at all
" let g:org_todo_setup='TODO | DONE'
" OR, e.g.,:
let g:org_todo_setup='TODO NEXT STARTED | DONE CANCELED'
" include a tags setup string if you want:
let g:org_tags_alist='{@home(h) @work(w)} {easy(e) hard(d)} {computer(c) phone(p)}'
"
" g:org_agenda_dirs specify directories that, along with
" their subtrees, are searched for list of .org files when
" accessing EditAgendaFiles(). Specify your own here, otherwise
" default will be for g:org_agenda_dirs to hold single
" directory which is directory of the first .org file opened
" in current Vim instance:
" Below is line I use in my Windows install:
" NOTE: case sensitive even on windows.
let g:org_agenda_select_dirs=["~/Dropbox/org"]
let g:org_agenda_files = split(glob("~/Dropbox/*.org"),"\n")
" ----------------------
" Emacs setup
" ----------------------
" To use Emacs you will need to define the client. On
" Linux/OSX this is typically simple, just:
let g:org_command_for_emacsclient = '/Applications/Emacs.app/Contents/MacOS/bin/emacsclient'
"
" Set up the correct path variables
let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l")
let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
" Use powerline, configure depending on OS we are running. See .vim/plugin/myFunctions.vim for GetRunningOS()
let os = GetRunningOS()
if os == "linux"
source $HOME/.local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim
elseif os == "mac"
source /usr/local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim
endif
" could extend the above to run OS specific stuff
set laststatus=2
" possibly not relevant because I don't use GUI Vim?
set guifont=Inconsolata\ for\ Powerline:h12
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
set term=xterm-256color
set termencoding=utf-8