Browse code
Adding nvimrc various tweaks
- Tmux:
- open new windows/panes in same directory
- make escape key more responsive
- Vimrc:
- new settings for PHP / sass
- new bundles:
- fixed haskell
- vim-matchit: better % for html
- jinja support
- haskell plugins
- php plugins
- vagrant support
- rust support
- nerdtree
- mappings:
- add mappings for switching tabs
- add mappings for toggling nerdtree
- add mapping for toggling Gundo
- add mapping to rsync to vagrant
- xmonad:
- reorganize add named scratchpads
- zshrc:
- improve activate_env for virtualenvs
- add function to auto-cd to git root
- sitecustomize: use Linux paths
- tmux zsh plugin:
- define functions for man / horizontal splitting
Showing 10 changed files
- .gitignore
- .nvimrc
- .tmux.conf
- .vimrc
- .xmonad/cheatsheet.png
- .xmonad/xmonad.hs
- .zshrc
- sitecustomize2.py
- sitecustomize3.py
- zsh_plugins/01_tmux.zsh
... | ... |
@@ -1,15 +1,16 @@ |
1 |
-" This goes here in case a filetype overrides it |
|
1 |
+let g:python_host_prog = '/usr/bin/python' |
|
2 |
+let g:python3_host_prog = '/usr/bin/python3' |
|
2 | 3 |
|
3 | 4 |
"NeoBundle Scripts----------------------------- |
4 | 5 |
if has('vim_starting') |
5 | 6 |
set nocompatible " Be iMproved |
6 | 7 |
|
7 | 8 |
" Required: |
8 |
- set runtimepath+=$HOME/.vim/bundle/neobundle.vim/ |
|
9 |
+ set runtimepath+=$HOME/.nvim/bundle/neobundle.vim/ |
|
9 | 10 |
endif |
10 | 11 |
|
11 | 12 |
" Required: |
12 |
-call neobundle#begin(expand("$HOME/.vim/bundle")) |
|
13 |
+call neobundle#begin(expand("$HOME/.nvim/bundle")) |
|
13 | 14 |
|
14 | 15 |
" Let NeoBundle manage NeoBundle |
15 | 16 |
" Required: |
... | ... |
@@ -23,10 +24,10 @@ NeoBundle 'bling/vim-airline' |
23 | 24 |
NeoBundle 'burnettk/vim-angular' |
24 | 25 |
NeoBundle 'christoomey/vim-tmux-navigator' |
25 | 26 |
NeoBundle 'curist/vim-angular-template' |
26 |
-NeoBundle 'eagletmt/ghcmod-vim' |
|
27 |
-NeoBundle 'eagletmt/neco-ghc' |
|
28 |
-"NeoBundle 'enomsg/vim-haskellConcealPlus' |
|
27 |
+NeoBundle 'edsono/vim-matchit' |
|
29 | 28 |
NeoBundle 'exu/pgsql.vim' |
29 |
+NeoBundle 'fiddlerwoaroof/htmljinja' |
|
30 |
+NeoBundle 'fiddlerwoaroof/vim-jinja' |
|
30 | 31 |
NeoBundle 'godlygeek/tabular' |
31 | 32 |
NeoBundle 'groenewege/vim-less' |
32 | 33 |
NeoBundle 'guns/vim-clojure-static' |
... | ... |
@@ -34,20 +35,24 @@ NeoBundle 'ivanov/vim-ipython' |
34 | 35 |
NeoBundle 'jmcantrell/vim-virtualenv' |
35 | 36 |
NeoBundle 'kien/rainbow_parentheses.vim' |
36 | 37 |
NeoBundle 'kovisoft/slimv' |
37 |
-"NeoBundle 'lukerandall/haskellmode-vim' |
|
38 |
+"NeoBundle 'm2mdas/phpcomplete-extended' |
|
39 |
+NeoBundle 'markcornick/vim-vagrant' |
|
38 | 40 |
NeoBundle 'matthewsimo/angular-vim-snippets' |
41 |
+NeoBundle 'mattn/emmet-vim.git' |
|
39 | 42 |
NeoBundle 'msanders/snipmate.vim' |
40 | 43 |
NeoBundle 'othree/javascript-libraries-syntax.vim' |
41 | 44 |
NeoBundle 'pangloss/vim-javascript' |
42 |
-NeoBundle 'raichoo/haskell-vim' |
|
45 |
+"NeoBundle 'rking/ag.vim' "Ag search utility |
|
46 |
+NeoBundle 'rust-lang/rust.vim' |
|
43 | 47 |
NeoBundle 'scrooloose/nerdcommenter' |
48 |
+NeoBundle 'scrooloose/nerdtree' |
|
44 | 49 |
NeoBundle 'scrooloose/syntastic' |
45 | 50 |
NeoBundle 'Shougo/unite-outline' |
46 | 51 |
NeoBundle 'Shougo/unite.vim' |
47 | 52 |
NeoBundle 'Shougo/vimfiler.vim' |
48 | 53 |
NeoBundle 'Shougo/vimproc' |
49 | 54 |
NeoBundle 'Shougo/vimshell.vim' |
50 |
-NeoBundle 'sjl/gundo.vim' |
|
55 |
+NeoBundle 'simnalamburt/vim-mundo' |
|
51 | 56 |
NeoBundle 'sjl/vitality.vim' |
52 | 57 |
NeoBundle 'sophacles/vim-bundle-mako' |
53 | 58 |
NeoBundle 'terryma/vim-multiple-cursors' |
... | ... |
@@ -55,15 +60,20 @@ NeoBundle 'tpope/vim-fireplace' |
55 | 60 |
NeoBundle 'tpope/vim-fugitive' |
56 | 61 |
NeoBundle 'tpope/vim-repeat' |
57 | 62 |
NeoBundle 'tpope/vim-surround' |
58 |
-"NeoBundle 'Twinside/vim-haskellFold' |
|
59 |
-NeoBundle 'Twinside/vim-hoogle' |
|
63 |
+"NeoBundle 'Valloric/YouCompleteMe' |
|
60 | 64 |
NeoBundle 'vim-pandoc/vim-pandoc' |
61 | 65 |
NeoBundle 'vim-scripts/dbext.vim' |
66 |
+NeoBundle 'vim-scripts/php.vim--Garvin' |
|
62 | 67 |
NeoBundle 'vim-scripts/pydoc.vim' |
63 | 68 |
NeoBundle 'vim-scripts/VimClojure' |
64 | 69 |
NeoBundle 'vim-voom/VOoM' |
65 | 70 |
NeoBundle 'ytsunetsune/unite-outline-euslisp' |
66 |
-NeoBundle 'mattn/emmet-vim.git' |
|
71 |
+ |
|
72 |
+NeoBundle 'neovimhaskell/haskell-vim' |
|
73 |
+NeoBundle 'enomsg/vim-haskellConcealPlus' |
|
74 |
+NeoBundle 'eagletmt/ghcmod-vim' |
|
75 |
+NeoBundle 'eagletmt/neco-ghc' |
|
76 |
+NeoBundle 'Twinside/vim-hoogle' |
|
67 | 77 |
|
68 | 78 |
" Required: |
69 | 79 |
call neobundle#end() |
... | ... |
@@ -75,31 +85,32 @@ filetype plugin indent on |
75 | 85 |
" this will conveniently prompt you to install them. |
76 | 86 |
NeoBundleCheck |
77 | 87 |
"End NeoBundle Scripts------------------------- |
78 |
-set mouse= |
|
88 |
+ |
|
89 |
+set mouse= ";; Disable mouse sensitivity !!! |
|
79 | 90 |
set nohlsearch |
80 | 91 |
let counter = 0 |
81 |
-let g:syntastic_auto_loc_list=1 |
|
82 |
-let g:sql_type_default = 'pgsql' |
|
83 | 92 |
let g:airline_theme="murmur" |
84 | 93 |
let g:haddock_browser_callformat = "%s %s" |
85 | 94 |
let g:haddock_browser = "open" |
86 | 95 |
let g:lisp_rainbow=1 |
96 |
+let g:pandoc#filetypes#handled = ["markdown", "rst", "textile"] |
|
97 |
+let g:pandoc_formatting_settings = "h" |
|
98 |
+let g:pandoc#modules#disabled = ["command", "bibliographies"] |
|
99 |
+let g:pandoc#modules#enabled = ["formatting", "folding", "completion", "metadata","menu"] |
|
87 | 100 |
let g:pandoc_no_empty_implicits=1 |
88 | 101 |
let g:pandoc_use_hard_wraps = 1 |
89 |
-let g:pandoc#modules#enabled = ["formatting", "folding", "completion", "metadata","menu"] |
|
90 |
-let g:pandoc#modules#disabled = ["command", "bibliographies"] |
|
91 |
-let g:pandoc_formatting_settings = "h" |
|
92 |
-let g:pandoc#filetypes#handled = ["markdown", "rst", "textile"] |
|
102 |
+let g:phpcomplete_index_composer_command = "composer" |
|
93 | 103 |
let g:slimv_disable_clojure=1 |
94 | 104 |
let g:snips_author="Edward Langley" |
95 | 105 |
let g:solarized_termtrans=1 |
106 |
+let g:sql_type_default = 'pgsql' |
|
107 |
+let g:syntastic_auto_loc_list=1 |
|
96 | 108 |
let g:syntastic_python_checkers = ['python'] |
109 |
+let g:syntastic_scss_sass_args = "-r sass-css-importer -r susy" |
|
97 | 110 |
let g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*' |
98 | 111 |
let g:tex_flavor='xelatex' |
99 | 112 |
let g:unite_force_overwrite_statusline = 0 |
100 | 113 |
let g:vimclojure#HighlightBuiltins = 1 |
101 |
-let g:vimclojure#HighlightBuiltins = 1 |
|
102 |
-let g:vimclojure#ParenRainbow = 1 |
|
103 | 114 |
let g:vimclojure#ParenRainbow = 1 |
104 | 115 |
let g:virtualenv_directory = "$HOME/python_envs" |
105 | 116 |
let maplocalleader=',' |
... | ... |
@@ -108,6 +119,7 @@ let python_highlight_all = 1 |
108 | 119 |
let python_no_tab_space_error=1 |
109 | 120 |
let python_space_errors=1 |
110 | 121 |
let vimclojure#WantNailgun = 1 |
122 |
+" This goes here in case a filetype overrides it |
|
111 | 123 |
|
112 | 124 |
|
113 | 125 |
" IMPORTANT: grep will sometimes skip displaying the file name if you |
... | ... |
@@ -158,7 +170,7 @@ set wildmode=longest,list |
158 | 170 |
set autoread |
159 | 171 |
set background=dark |
160 | 172 |
set pastetoggle=<F12> |
161 |
-set undodir=~/.vim/undodir |
|
173 |
+set undodir=~/.nvim/undodir |
|
162 | 174 |
set undofile |
163 | 175 |
set undolevels=10000 |
164 | 176 |
set undoreload=100000 |
... | ... |
@@ -195,29 +207,30 @@ function Checkft() |
195 | 207 |
endif |
196 | 208 |
endfunction |
197 | 209 |
|
198 |
-autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e |
|
199 |
-autocmd BufRead *.mako set ft=mako |
|
200 |
-autocmd BufRead *.md set dictionary+=/usr/share/dict/words |
|
210 |
+" when we reload, tell vim to restore the cursor to the saved position |
|
211 |
+"autocmd FileType python map K \pW |
|
212 |
+autocmd! BufNewFile * silent! 0r ~/.nvim/skel/tmpl.%:e |
|
213 |
+autocmd BufRead,BufNewFile *.twig set filetype=htmljinja |
|
214 |
+autocmd BufRead,BufNewFile *.mako set ft=mako |
|
215 |
+autocmd BufRead,BufNewFile *.md set dictionary+=/usr/share/dict/words |
|
201 | 216 |
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif |
202 |
-autocmd BufRead *.tac set ft=python |
|
203 |
-autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class |
|
204 |
-autocmd BufWritePre *.py normal m`:%s/\s\+$//e `` |
|
217 |
+autocmd BufRead,BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class |
|
218 |
+autocmd BufRead,BufNewFile *.tac set ft=python |
|
205 | 219 |
autocmd bufwritepost * call Checkft() |
220 |
+autocmd BufWritePre *.py normal m`:%s/\s\+$//e `` |
|
221 |
+ |
|
222 |
+autocmd FileType haskell set omnifunc=necoghc#omnifunc |
|
223 |
+autocmd FileType lisp set omnifunc=SlimvOmniComplete |
|
206 | 224 |
autocmd FileType markdown set linebreak tw=110 noexpandtab nosmartindent autoindent |
207 | 225 |
autocmd FileType pandoc set linebreak tw=110 noexpandtab nosmartindent autoindent |
208 | 226 |
autocmd FileType pantondoc set linebreak tw=110 noexpandtab nosmartindent autoindent |
209 |
-"autocmd FileType python map K \pW |
|
210 |
-autocmd FileType python set complete+=k~/.vim/syntax/python.vim "isk+=.,( |
|
211 |
-autocmd FileType haskell set omnifunc=necoghc#omnifunc |
|
212 |
-autocmd FileType lisp set omnifunc=SlimvOmniComplete |
|
213 |
-" when we reload, tell vim to restore the cursor to the saved position |
|
214 |
- |
|
227 |
+autocmd FileType python set complete+=k~/.nvim/syntax/python.vim "isk+=.,( |
|
215 | 228 |
"Diable the anti-python smart indent of # |
216 | 229 |
inoremap # X# |
217 | 230 |
|
218 | 231 |
"Turn Syntax Highlighting on by default, and assume the xterm background is black |
219 |
-imap <C-g> :Unite outline -buffer-name=outline -resume -start-insert |
|
220 |
-imap <F7> :Unite outline -buffer-name=outline -resume -start-insert |
|
232 |
+imap <C-g> :Unite outline -buffer-name=outline -start-insert<CR> |
|
233 |
+imap <F7> :Unite outline -buffer-name=outline -start-insert<CR> |
|
221 | 234 |
imap <F8> o :,!pbpaste |
222 | 235 |
imap <F9> o :,!pbpaste |
223 | 236 |
inoremap <expr> <C-L> ListItem() |
... | ... |
@@ -231,13 +244,13 @@ inoremap <Return> <Return><C-g>u |
231 | 244 |
"inoremap <Tab> <Tab><C-g>u |
232 | 245 |
|
233 | 246 |
map <BS> dh |
234 |
-map <C-g> :Unite outline -buffer-name=outline -resume -start-insert |
|
247 |
+map <C-g> :Unite outline -buffer-name=outline -start-insert<CR> |
|
235 | 248 |
map CS :sil! :%s/\s\+$//g<CR>``:%s/^\(\t\+\)\( \+\(\t*\)\)\+/\1\3/gc<CR>`` |
236 |
-map <F7> :Unite outline -buffer-name=files -resume -start-insert |
|
237 |
-map <F8> o :,!pbpaste |
|
238 |
-map <F9> o :,!pbpaste |
|
239 |
-map <leader>f :Unite file -buffer-name=files -resume<CR>i |
|
240 |
-map <leader>q :Unite buffer -buffer-name=buffers -resume<CR>i |
|
249 |
+map <F7> :Unite outline -buffer-name=files -start-insert<CR> |
|
250 |
+map <F8> o :,!pbpaste<CR> |
|
251 |
+map <F9> o :,!pbpaste<CR> |
|
252 |
+map <leader>f :Unite file -buffer-name=files -start-insert<CR> |
|
253 |
+map <leader>q :Unite buffer -buffer-name=buffers -start-insert<CR> |
|
241 | 254 |
map W wb"_dwP |
242 | 255 |
map ZX :wq<cr> |
243 | 256 |
map ZZ :w<CR> |
... | ... |
@@ -249,14 +262,14 @@ nnoremap <C-K> <C-W><C-K> |
249 | 262 |
nnoremap <C-L> <C-W><C-L> |
250 | 263 |
nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR> |
251 | 264 |
|
252 |
-"python << EOF |
|
253 |
-"import os |
|
254 |
-"import sys |
|
255 |
-"import vim |
|
256 |
-"for p in sys.path: |
|
257 |
-" if os.path.isdir(p): |
|
258 |
-" vim.command(r"set path+=%s" % (p.replace(" ", r"\ "))) |
|
259 |
-"EOF |
|
265 |
+python << EOF |
|
266 |
+import os |
|
267 |
+import sys |
|
268 |
+import vim |
|
269 |
+for p in sys.path: |
|
270 |
+ if os.path.isdir(p): |
|
271 |
+ vim.command(r"set path+=%s" % (p.replace(" ", r"\ "))) |
|
272 |
+EOF |
|
260 | 273 |
|
261 | 274 |
|
262 | 275 |
func ListItem() |
... | ... |
@@ -273,8 +286,8 @@ set diffopt=vertical,filler,iwhite,foldcolumn:0 |
273 | 286 |
|
274 | 287 |
highlight PmenuSel ctermfg=LightGray ctermbg=DarkRed |
275 | 288 |
|
276 |
-if filereadable(".vim.custom") |
|
277 |
- so .vim.custom |
|
289 |
+if filereadable(".nvim.custom") |
|
290 |
+ so .nvim.custom |
|
278 | 291 |
endif |
279 | 292 |
|
280 | 293 |
let g:syntastic_javascript_checkers = ['jshint'] |
... | ... |
@@ -301,19 +314,17 @@ function! s:unite_my_settings() |
301 | 314 |
endfunction |
302 | 315 |
|
303 | 316 |
if executable('ag') |
304 |
- " let g:unite_source_file_async_command = |
|
305 |
- " \ 'ag --follow --nocolor --nogroup --hidden -g ""' |
|
306 |
- " https://github.com/ggreer/the_silver_searcher |
|
307 |
- " Use ag in unite grep source. |
|
308 |
- " let g:unite_source_rec_async_command = 'ag --follow --nocolor --nogroup --hidden ' . |
|
309 |
- " \ '--ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
310 |
- " \ '--ignore ''**/*.pyc'' -g ""' |
|
311 |
- let g:unite_source_grep_command = 'ag' |
|
312 |
- let g:unite_source_grep_default_opts = |
|
313 |
- \ '--line-numbers --nocolor --nogroup --hidden --ignore ' . |
|
314 |
- \ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
315 |
- \ '--ignore ''**/*.pyc''' |
|
316 |
- let g:unite_source_grep_recursive_opt = '' |
|
317 |
+ let g:unite_source_file_async_command = |
|
318 |
+ \ 'ag --follow --nocolor --nogroup --hidden -g "" --ignore ''.sass-cache''' |
|
319 |
+ "https://github.com/ggreer/the_silver_searcher |
|
320 |
+ "Use ag in unite grep source. |
|
321 |
+ let g:unite_source_rec_async_command = ['ag', '--follow', '--nocolor', '--nogroup', '--hidden', '-g', '', '--ignore', '.git', '--ignore', '.sass-cache'] |
|
322 |
+ "let g:unite_source_grep_command = 'ag' |
|
323 |
+ "let g:unite_source_grep_default_opts = |
|
324 |
+ " \ '--line-numbers --nocolor --nogroup --hidden --ignore ' . |
|
325 |
+ " \ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
326 |
+ " \ '--ignore ''**/*.pyc''' |
|
327 |
+ "let g:unite_source_grep_recursive_opt = '' |
|
317 | 328 |
elseif executable('ack-grep') |
318 | 329 |
let g:unite_source_grep_command = 'ack-grep' |
319 | 330 |
" Match whole word only. This might/might not be a good idea |
... | ... |
@@ -336,6 +347,11 @@ nmap [unite]f :<C-u>Unite file_rec/async -start-insert<C-m> |
336 | 347 |
nmap [unite]F :<C-u>Unite file -start-insert<C-m> |
337 | 348 |
nmap [unite]g :<C-u>Unite file_rec/git -start-insert<C-m> |
338 | 349 |
nmap [unite]j :<C-u>Unite buffer -start-insert<C-m> |
350 |
+nmap [unite]k :<C-u>Unite tab:no-current<C-m> |
|
351 |
+nmap [unite]h :<C-u>set hlsearch!<C-m> |
|
352 |
+nmap [unite]t :<C-u>NERDTreeToggle<CR> |
|
353 |
+nmap [unite]u :<C-u>GundoToggle<CR> |
|
354 |
+nmap [unite]r :<C-u>!vagrant rsync<CR> |
|
339 | 355 |
|
340 | 356 |
" Reload |
341 | 357 |
map <silent> tu :call GHC_BrowseAll()<CR> |
... | ... |
@@ -9,6 +9,12 @@ bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq v |
9 | 9 |
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R" |
10 | 10 |
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l" |
11 | 11 |
|
12 |
+# Open new windows/panes in same directory |
|
13 |
+bind '"' split-window -c "#{pane_current_path}" |
|
14 |
+bind % split-window -h -c "#{pane_current_path}" |
|
15 |
+bind c new-window -c "#{pane_current_path}" |
|
16 |
+ |
|
17 |
+ |
|
12 | 18 |
|
13 | 19 |
set -g status-left-length 52 |
14 | 20 |
set -g status-right-length 451 |
... | ... |
@@ -24,3 +30,4 @@ set -g status-left '#[fg=colour235,bg=colour252,bold] #S #[fg=colour252,bg=colo |
24 | 30 |
set -g window-status-format "#[fg=white,bg=colour234] #I #W" |
25 | 31 |
set -g window-status-current-format "#[fg=colour234,bg=colour39] #[fg=colour25,bg=colour39,noreverse,bold] #I #W #[fg=colour39,bg=colour234,nobold]" |
26 | 32 |
|
33 |
+set -sg escape-time 0 |
... | ... |
@@ -1,4 +1,38 @@ |
1 |
-http://clean.cs.ru.nl" This goes here in case a filetype overrides it |
|
1 |
+let counter = 0 |
|
2 |
+let g:syntastic_auto_loc_list=1 |
|
3 |
+let g:sql_type_default = 'pgsql' |
|
4 |
+let g:airline_theme="murmur" |
|
5 |
+let g:haddock_browser_callformat = "%s %s" |
|
6 |
+let g:haddock_browser = "open" |
|
7 |
+let g:lisp_rainbow=1 |
|
8 |
+let g:pandoc_no_empty_implicits=1 |
|
9 |
+let g:pandoc_use_hard_wraps = 1 |
|
10 |
+let g:pandoc#modules#enabled = ["formatting", "folding", "completion", "metadata","menu"] |
|
11 |
+let g:pandoc#modules#disabled = ["command", "bibliographies"] |
|
12 |
+let g:pandoc_formatting_settings = "h" |
|
13 |
+let g:pandoc#filetypes#handled = ["markdown", "rst", "textile"] |
|
14 |
+let g:slimv_disable_clojure=1 |
|
15 |
+let g:snips_author="Edward Langley" |
|
16 |
+let g:solarized_termtrans=1 |
|
17 |
+let g:syntastic_python_checkers = ['python'] |
|
18 |
+let g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*' |
|
19 |
+let g:tex_flavor='xelatex' |
|
20 |
+let g:unite_force_overwrite_statusline = 0 |
|
21 |
+let g:vimclojure#HighlightBuiltins = 1 |
|
22 |
+let g:vimclojure#HighlightBuiltins = 1 |
|
23 |
+let g:vimclojure#ParenRainbow = 1 |
|
24 |
+let g:vimclojure#ParenRainbow = 1 |
|
25 |
+let g:virtualenv_directory = "$HOME/python_envs" |
|
26 |
+let g:phpcomplete_index_composer_command = "composer" |
|
27 |
+let maplocalleader=',' |
|
28 |
+let $PAGER='' |
|
29 |
+let python_highlight_all = 1 |
|
30 |
+let python_no_tab_space_error=1 |
|
31 |
+let python_space_errors=1 |
|
32 |
+let vimclojure#WantNailgun = 1 |
|
33 |
+let g:syntastic_scss_sass_args = "-r sass-css-importer -r susy" |
|
34 |
+ |
|
35 |
+" This goes here in case a filetype overrides it |
|
2 | 36 |
|
3 | 37 |
"NeoBundle Scripts----------------------------- |
4 | 38 |
if has('vim_starting') |
... | ... |
@@ -16,6 +50,9 @@ call neobundle#begin(expand("$HOME/.vim/bundle")) |
16 | 50 |
NeoBundleFetch 'Shougo/neobundle.vim' |
17 | 51 |
|
18 | 52 |
" My Bundles here: |
53 |
+ |
|
54 |
+ |
|
55 |
+ |
|
19 | 56 |
NeoBundle 'altercation/vim-colors-solarized' |
20 | 57 |
NeoBundle 'bitc/vim-hdevtools' |
21 | 58 |
NeoBundle 'Blackrush/vim-gocode' |
... | ... |
@@ -25,8 +62,11 @@ NeoBundle 'christoomey/vim-tmux-navigator' |
25 | 62 |
NeoBundle 'curist/vim-angular-template' |
26 | 63 |
NeoBundle 'eagletmt/ghcmod-vim' |
27 | 64 |
NeoBundle 'eagletmt/neco-ghc' |
65 |
+NeoBundle 'edsono/vim-matchit' |
|
28 | 66 |
"NeoBundle 'enomsg/vim-haskellConcealPlus' |
29 | 67 |
NeoBundle 'exu/pgsql.vim' |
68 |
+NeoBundle 'fiddlerwoaroof/htmljinja' |
|
69 |
+NeoBundle 'fiddlerwoaroof/vim-jinja' |
|
30 | 70 |
NeoBundle 'godlygeek/tabular' |
31 | 71 |
NeoBundle 'groenewege/vim-less' |
32 | 72 |
NeoBundle 'guns/vim-clojure-static' |
... | ... |
@@ -34,13 +74,19 @@ NeoBundle 'ivanov/vim-ipython' |
34 | 74 |
NeoBundle 'jmcantrell/vim-virtualenv' |
35 | 75 |
NeoBundle 'kien/rainbow_parentheses.vim' |
36 | 76 |
NeoBundle 'kovisoft/slimv' |
37 |
-"NeoBundle 'lukerandall/haskellmode-vim' |
|
77 |
+NeoBundle 'lukerandall/haskellmode-vim' |
|
78 |
+"NeoBundle 'm2mdas/phpcomplete-extended' |
|
79 |
+NeoBundle 'markcornick/vim-vagrant' |
|
38 | 80 |
NeoBundle 'matthewsimo/angular-vim-snippets' |
81 |
+NeoBundle 'mattn/emmet-vim.git' |
|
39 | 82 |
NeoBundle 'msanders/snipmate.vim' |
40 | 83 |
NeoBundle 'othree/javascript-libraries-syntax.vim' |
41 | 84 |
NeoBundle 'pangloss/vim-javascript' |
42 | 85 |
NeoBundle 'raichoo/haskell-vim' |
86 |
+"NeoBundle 'rking/ag.vim' "Ag search utility |
|
87 |
+NeoBundle 'rust-lang/rust.vim' |
|
43 | 88 |
NeoBundle 'scrooloose/nerdcommenter' |
89 |
+NeoBundle 'scrooloose/nerdtree' |
|
44 | 90 |
NeoBundle 'scrooloose/syntastic' |
45 | 91 |
NeoBundle 'Shougo/unite-outline' |
46 | 92 |
NeoBundle 'Shougo/unite.vim' |
... | ... |
@@ -55,15 +101,16 @@ NeoBundle 'tpope/vim-fireplace' |
55 | 101 |
NeoBundle 'tpope/vim-fugitive' |
56 | 102 |
NeoBundle 'tpope/vim-repeat' |
57 | 103 |
NeoBundle 'tpope/vim-surround' |
58 |
-"NeoBundle 'Twinside/vim-haskellFold' |
|
104 |
+NeoBundle 'Twinside/vim-haskellFold' |
|
59 | 105 |
NeoBundle 'Twinside/vim-hoogle' |
106 |
+"NeoBundle 'Valloric/YouCompleteMe' |
|
60 | 107 |
NeoBundle 'vim-pandoc/vim-pandoc' |
61 | 108 |
NeoBundle 'vim-scripts/dbext.vim' |
109 |
+NeoBundle 'vim-scripts/php.vim--Garvin' |
|
62 | 110 |
NeoBundle 'vim-scripts/pydoc.vim' |
63 | 111 |
NeoBundle 'vim-scripts/VimClojure' |
64 | 112 |
NeoBundle 'vim-voom/VOoM' |
65 | 113 |
NeoBundle 'ytsunetsune/unite-outline-euslisp' |
66 |
-NeoBundle 'mattn/emmet-vim.git' |
|
67 | 114 |
|
68 | 115 |
" Required: |
69 | 116 |
call neobundle#end() |
... | ... |
@@ -194,29 +241,31 @@ function Checkft() |
194 | 241 |
endif |
195 | 242 |
endfunction |
196 | 243 |
|
244 |
+ |
|
245 |
+" when we reload, tell vim to restore the cursor to the saved position |
|
246 |
+"autocmd FileType python map K \pW |
|
197 | 247 |
autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e |
198 |
-autocmd BufRead *.mako set ft=mako |
|
199 |
-autocmd BufRead *.md set dictionary+=/usr/share/dict/words |
|
248 |
+autocmd BufRead,BufNewFile *.twig set filetype=htmljinja |
|
249 |
+autocmd BufRead,BufNewFile *.mako set ft=mako |
|
250 |
+autocmd BufRead,BufNewFile *.md set dictionary+=/usr/share/dict/words |
|
200 | 251 |
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif |
201 |
-autocmd BufRead *.tac set ft=python |
|
202 |
-autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class |
|
203 |
-autocmd BufWritePre *.py normal m`:%s/\s\+$//e `` |
|
252 |
+autocmd BufRead,BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class |
|
253 |
+autocmd BufRead,BufNewFile *.tac set ft=python |
|
204 | 254 |
autocmd bufwritepost * call Checkft() |
255 |
+autocmd BufWritePre *.py normal m`:%s/\s\+$//e `` |
|
256 |
+ |
|
257 |
+autocmd FileType haskell set omnifunc=necoghc#omnifunc |
|
258 |
+autocmd FileType lisp set omnifunc=SlimvOmniComplete |
|
205 | 259 |
autocmd FileType markdown set linebreak tw=110 noexpandtab nosmartindent autoindent |
206 | 260 |
autocmd FileType pandoc set linebreak tw=110 noexpandtab nosmartindent autoindent |
207 | 261 |
autocmd FileType pantondoc set linebreak tw=110 noexpandtab nosmartindent autoindent |
208 |
-"autocmd FileType python map K \pW |
|
209 | 262 |
autocmd FileType python set complete+=k~/.vim/syntax/python.vim "isk+=.,( |
210 |
-autocmd FileType haskell set omnifunc=necoghc#omnifunc |
|
211 |
-autocmd FileType lisp set omnifunc=SlimvOmniComplete |
|
212 |
-" when we reload, tell vim to restore the cursor to the saved position |
|
213 |
- |
|
214 | 263 |
"Diable the anti-python smart indent of # |
215 | 264 |
inoremap # X# |
216 | 265 |
|
217 | 266 |
"Turn Syntax Highlighting on by default, and assume the xterm background is black |
218 |
-imap <C-g> :Unite outline -buffer-name=outline -resume -start-insert |
|
219 |
-imap <F7> :Unite outline -buffer-name=outline -resume -start-insert |
|
267 |
+imap <C-g> :Unite outline -buffer-name=outline -start-insert<CR> |
|
268 |
+imap <F7> :Unite outline -buffer-name=outline -start-insert<CR> |
|
220 | 269 |
imap <F8> o :,!pbpaste |
221 | 270 |
imap <F9> o :,!pbpaste |
222 | 271 |
inoremap <expr> <C-L> ListItem() |
... | ... |
@@ -230,13 +279,13 @@ inoremap <Return> <Return><C-g>u |
230 | 279 |
"inoremap <Tab> <Tab><C-g>u |
231 | 280 |
|
232 | 281 |
map <BS> dh |
233 |
-map <C-g> :Unite outline -buffer-name=outline -resume -start-insert |
|
282 |
+map <C-g> :Unite outline -buffer-name=outline -start-insert<CR> |
|
234 | 283 |
map CS :sil! :%s/\s\+$//g<CR>``:%s/^\(\t\+\)\( \+\(\t*\)\)\+/\1\3/gc<CR>`` |
235 |
-map <F7> :Unite outline -buffer-name=files -resume -start-insert |
|
236 |
-map <F8> o :,!pbpaste |
|
237 |
-map <F9> o :,!pbpaste |
|
238 |
-map <leader>f :Unite file -buffer-name=files -resume<CR>i |
|
239 |
-map <leader>q :Unite buffer -buffer-name=buffers -resume<CR>i |
|
284 |
+map <F7> :Unite outline -buffer-name=files -start-insert<CR> |
|
285 |
+map <F8> o :,!pbpaste<CR> |
|
286 |
+map <F9> o :,!pbpaste<CR> |
|
287 |
+map <leader>f :Unite file -buffer-name=files -start-insert<CR> |
|
288 |
+map <leader>q :Unite buffer -buffer-name=buffers -start-insert<CR> |
|
240 | 289 |
map W wb"_dwP |
241 | 290 |
map ZX :wq<cr> |
242 | 291 |
map ZZ :w<CR> |
... | ... |
@@ -300,19 +349,17 @@ function! s:unite_my_settings() |
300 | 349 |
endfunction |
301 | 350 |
|
302 | 351 |
if executable('ag') |
303 |
- " let g:unite_source_file_async_command = |
|
304 |
- " \ 'ag --follow --nocolor --nogroup --hidden -g ""' |
|
305 |
- " https://github.com/ggreer/the_silver_searcher |
|
306 |
- " Use ag in unite grep source. |
|
307 |
- " let g:unite_source_rec_async_command = 'ag --follow --nocolor --nogroup --hidden ' . |
|
308 |
- " \ '--ignore ''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
309 |
- " \ '--ignore ''**/*.pyc'' -g ""' |
|
310 |
- let g:unite_source_grep_command = 'ag' |
|
311 |
- let g:unite_source_grep_default_opts = |
|
312 |
- \ '--line-numbers --nocolor --nogroup --hidden --ignore ' . |
|
313 |
- \ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
314 |
- \ '--ignore ''**/*.pyc''' |
|
315 |
- let g:unite_source_grep_recursive_opt = '' |
|
352 |
+ let g:unite_source_file_async_command = |
|
353 |
+ \ 'ag --follow --nocolor --nogroup --hidden -g "" --ignore ''.sass-cache''' |
|
354 |
+ "https://github.com/ggreer/the_silver_searcher |
|
355 |
+ "Use ag in unite grep source. |
|
356 |
+ let g:unite_source_rec_async_command = ['ag', '--follow', '--nocolor', '--nogroup', '--hidden', '-g', '', '--ignore', '.git', '--ignore', '.sass-cache'] |
|
357 |
+ "let g:unite_source_grep_command = 'ag' |
|
358 |
+ "let g:unite_source_grep_default_opts = |
|
359 |
+ " \ '--line-numbers --nocolor --nogroup --hidden --ignore ' . |
|
360 |
+ " \ '''.hg'' --ignore ''.svn'' --ignore ''.git'' --ignore ''.bzr'' ' . |
|
361 |
+ " \ '--ignore ''**/*.pyc''' |
|
362 |
+ "let g:unite_source_grep_recursive_opt = '' |
|
316 | 363 |
elseif executable('ack-grep') |
317 | 364 |
let g:unite_source_grep_command = 'ack-grep' |
318 | 365 |
" Match whole word only. This might/might not be a good idea |
... | ... |
@@ -335,9 +382,15 @@ nmap [unite]f :<C-u>Unite file_rec/async -start-insert<C-m> |
335 | 382 |
nmap [unite]F :<C-u>Unite file -start-insert<C-m> |
336 | 383 |
nmap [unite]g :<C-u>Unite file_rec/git -start-insert<C-m> |
337 | 384 |
nmap [unite]j :<C-u>Unite buffer -start-insert<C-m> |
385 |
+nmap [unite]k :<C-u>Unite tab:no-current<C-m> |
|
386 |
+nmap [unite]t :NERDTreeToggle<CR> |
|
387 |
+nmap [unite]u :GundoToggle<CR> |
|
388 |
+nmap [unite]r :!vagrant rsync<CR> |
|
338 | 389 |
|
339 | 390 |
" Reload |
340 | 391 |
map <silent> tu :call GHC_BrowseAll()<CR> |
341 | 392 |
" Type Lookup |
342 | 393 |
map <silent> tw :call GHC_ShowType(1)<CR> |
343 | 394 |
autocmd BufRead,BufNewFile *.css,*.scss,*.less setlocal foldmethod=marker foldmarker={,} |
395 |
+ |
|
396 |
+ |
... | ... |
@@ -22,7 +22,6 @@ import XMonad.Hooks.EwmhDesktops |
22 | 22 |
import XMonad.Hooks.ICCCMFocus |
23 | 23 |
import XMonad.Hooks.ManageDocks |
24 | 24 |
import XMonad.Layout.Accordion |
25 |
-{-import XMonad.Layout.BoringWindows hiding (Replace)-} |
|
26 | 25 |
import XMonad.Layout.Circle |
27 | 26 |
import XMonad.Layout.Combo() |
28 | 27 |
import XMonad.Layout.Decoration |
... | ... |
@@ -52,6 +51,8 @@ import XMonad.Util.Dzen |
52 | 51 |
import XMonad.Util.EZConfig(additionalKeys) |
53 | 52 |
import XMonad.Util.Loggers |
54 | 53 |
import XMonad.Util.Run(spawnPipe) |
54 |
+import XMonad.Util.Scratchpad |
|
55 |
+import XMonad.Util.NamedScratchpad |
|
55 | 56 |
|
56 | 57 |
nmaster :: Int |
57 | 58 |
nmaster = 1 |
... | ... |
@@ -172,9 +173,9 @@ nchooseLayout conf = do |
172 | 173 |
|
173 | 174 |
|
174 | 175 |
myPP :: PP |
175 |
-myPP = sjanssenPP { |
|
176 |
+myPP = namedScratchpadFilterOutWorkspacePP $ sjanssenPP { |
|
176 | 177 |
ppCurrent = xmobarColor "grey" "white", |
177 |
- ppHidden = xmobarColor "red" "black", |
|
178 |
+ ppHidden = xmobarColor "red" "black", -- . noScratchPad, |
|
178 | 179 |
ppHiddenNoWindows = id, |
179 | 180 |
ppTitle = xmobarColor "green" "" . shorten 126 |
180 | 181 |
} |
... | ... |
@@ -190,9 +191,30 @@ myManageHook = composeAll |
190 | 191 |
, className =? "feh" --> viewShift "images" |
191 | 192 |
, className =? "Display.im6" --> viewShift "images" |
192 | 193 |
, manageDocks |
193 |
- ] |
|
194 |
+ ] <+> manageScratchPad |
|
194 | 195 |
where role = stringProperty "WM_WINDOW_ROLE" |
195 | 196 |
|
197 |
+manageScratchPad :: ManageHook |
|
198 |
+manageScratchPad = namedScratchpadManageHook scratchpads |
|
199 |
+ |
|
200 |
+scratchpads :: [NamedScratchpad] |
|
201 |
+scratchpads = [ |
|
202 |
+ -- run htop in xterm, find it by title, use default floating window placement |
|
203 |
+ NS "htop" "xterm -e htop" (title =? "htop") floatStyle , |
|
204 |
+ NS "mutt" "xterm -e mutt" (title =? "mutt") floatStyle , |
|
205 |
+ NS "mcabber" "xterm -e mcabber" (title =? "mcabber") floatStyle , |
|
206 |
+ NS "irc" "xterm -e irssi" (title =? "irssi") floatStyle , |
|
207 |
+ NS "mpc" "stterm -c mpc -e ncmpcpp" (className =? "ncmpcpp") floatStyle , |
|
208 |
+ |
|
209 |
+ -- run gvim, find by role |
|
210 |
+ NS "notes" "bash -c 'cd $HOME/mywiki; source /usr/local/share/chruby/chruby.sh; chruby 2.2.2; SOYWIKI_VIM=\"gvim --role notes\" /home/edwlan/.gem/ruby/2.2.2/bin/soywiki'" (role =? "notes") floatStyle |
|
211 |
+ ] where cls = stringProperty "WM_WINDOW_CLASS" |
|
212 |
+ role = stringProperty "WM_WINDOW_ROLE" |
|
213 |
+ floatStyle = customFloating $ W.RationalRect l t w h |
|
214 |
+ w = 1 -- terminal height, 10% |
|
215 |
+ h = 0.3333 -- terminal width, 100% |
|
216 |
+ t = 0.015 -- distance from top edge, 90% |
|
217 |
+ l = 0 -- distance from left edge, 0% |
|
196 | 218 |
|
197 | 219 |
doCopy :: WorkspaceId -> ManageHook |
198 | 220 |
doCopy i = doF . copyWin i =<< ask |
... | ... |
@@ -252,19 +274,33 @@ main = do |
252 | 274 |
XMonad.workspaces = ["web", "terminal", "1", "2", "3", "4", "5", "6", "images", "IM"] |
253 | 275 |
} `additionalKeys` ( |
254 | 276 |
[ |
255 |
- (((mod4Mask .|. controlMask, xK_q ), |
|
256 |
- spawn "if type xmonad; then xmonad --recompile && xmonad --restart; else xmessage xmonad not in \\$PATH: \"$PATH\"; fi")), |
|
257 |
- |
|
258 |
- ((mod4Mask .|. shiftMask, xK_backslash), maximizeSwitch), |
|
259 |
- ((mod4Mask .|. controlMask, xK_backslash), maximizeFlop), |
|
260 |
- ((mod4Mask, xK_backslash), withFocused (sendMessage . maximizeRestore)), |
|
277 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 1), shiftNSwitch windows "web" ), |
|
278 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 2), shiftNSwitch windows "terminal" ), |
|
279 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 3), shiftNSwitch windows "1" ), |
|
280 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 4), shiftNSwitch windows "2" ), |
|
281 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 5), shiftNSwitch windows "3" ), |
|
282 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 6), shiftNSwitch windows "4" ), |
|
283 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 7), shiftNSwitch windows "5" ), |
|
284 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 8), shiftNSwitch windows "6" ), |
|
285 |
+ ((mod4Mask .|. controlMask, numPadKeys !! 9), shiftNSwitch windows "images" ), |
|
261 | 286 |
((mod4Mask .|. controlMask .|. shiftMask, xK_h ), sendMessage $ Move L), |
262 | 287 |
((mod4Mask .|. controlMask .|. shiftMask, xK_j ), sendMessage $ Move D), |
263 | 288 |
((mod4Mask .|. controlMask .|. shiftMask, xK_k ), sendMessage $ Move U), |
264 | 289 |
((mod4Mask .|. controlMask .|. shiftMask, xK_l), sendMessage $ Move R), |
265 |
- ((mod4Mask .|. controlMask, xK_k), killAllOtherCopies), |
|
290 |
+ ((mod4Mask .|. controlMask, xK_1), shiftNSwitch windows "web" ), |
|
291 |
+ ((mod4Mask .|. controlMask, xK_2), shiftNSwitch windows "terminal" ), |
|
292 |
+ ((mod4Mask .|. controlMask, xK_3), shiftNSwitch windows "1" ), |
|
293 |
+ ((mod4Mask .|. controlMask, xK_4), shiftNSwitch windows "2" ), |
|
294 |
+ ((mod4Mask .|. controlMask, xK_5), shiftNSwitch windows "3" ), |
|
295 |
+ ((mod4Mask .|. controlMask, xK_6), shiftNSwitch windows "4" ), |
|
296 |
+ ((mod4Mask .|. controlMask, xK_7), shiftNSwitch windows "5" ), |
|
297 |
+ ((mod4Mask .|. controlMask, xK_8), shiftNSwitch windows "6" ), |
|
298 |
+ ((mod4Mask .|. controlMask, xK_9), shiftNSwitch windows "images" ), |
|
299 |
+ ((mod4Mask .|. controlMask, xK_backslash), maximizeFlop), |
|
300 |
+ ((mod4Mask .|. controlMask, xK_grave), shiftNSwitch windows "IM" ), |
|
266 | 301 |
((mod4Mask .|. controlMask, xK_m), withWorkspace defaultXPConfig (windows . shift)), |
267 |
- |
|
302 |
+ (((mod4Mask .|. controlMask, xK_q ), spawn "if type xmonad; then xmonad --recompile && xmonad --restart; else xmessage xmonad not in \\$PATH: \"$PATH\"; fi")), |
|
303 |
+ ((mod4Mask .|. controlMask, xK_t), killAllOtherCopies), |
|
268 | 304 |
((mod4Mask, numPadKeys !! 1), switchWorkspace "web" ), |
269 | 305 |
((mod4Mask, numPadKeys !! 2), switchWorkspace "terminal" ), |
270 | 306 |
((mod4Mask, numPadKeys !! 3), switchWorkspace "1" ), |
... | ... |
@@ -274,7 +310,6 @@ main = do |
274 | 310 |
((mod4Mask, numPadKeys !! 7), switchWorkspace "5" ), |
275 | 311 |
((mod4Mask, numPadKeys !! 8), switchWorkspace "6" ), |
276 | 312 |
((mod4Mask, numPadKeys !! 9), switchWorkspace "images" ), |
277 |
- |
|
278 | 313 |
((mod4Mask .|. shiftMask, numPadKeys !! 1), copyNSwitch windows "web" ), |
279 | 314 |
((mod4Mask .|. shiftMask, numPadKeys !! 2), copyNSwitch windows "terminal" ), |
280 | 315 |
((mod4Mask .|. shiftMask, numPadKeys !! 3), copyNSwitch windows "1" ), |
... | ... |
@@ -284,28 +319,6 @@ main = do |
284 | 319 |
((mod4Mask .|. shiftMask, numPadKeys !! 7), copyNSwitch windows "5" ), |
285 | 320 |
((mod4Mask .|. shiftMask, numPadKeys !! 8), copyNSwitch windows "6" ), |
286 | 321 |
((mod4Mask .|. shiftMask, numPadKeys !! 9), copyNSwitch windows "images" ), |
287 |
- |
|
288 |
- ((mod4Mask .|. controlMask, numPadKeys !! 1), shiftNSwitch windows "web" ), |
|
289 |
- ((mod4Mask .|. controlMask, numPadKeys !! 2), shiftNSwitch windows "terminal" ), |
|
290 |
- ((mod4Mask .|. controlMask, numPadKeys !! 3), shiftNSwitch windows "1" ), |
|
291 |
- ((mod4Mask .|. controlMask, numPadKeys !! 4), shiftNSwitch windows "2" ), |
|
292 |
- ((mod4Mask .|. controlMask, numPadKeys !! 5), shiftNSwitch windows "3" ), |
|
293 |
- ((mod4Mask .|. controlMask, numPadKeys !! 6), shiftNSwitch windows "4" ), |
|
294 |
- ((mod4Mask .|. controlMask, numPadKeys !! 7), shiftNSwitch windows "5" ), |
|
295 |
- ((mod4Mask .|. controlMask, numPadKeys !! 8), shiftNSwitch windows "6" ), |
|
296 |
- ((mod4Mask .|. controlMask, numPadKeys !! 9), shiftNSwitch windows "images" ), |
|
297 |
- |
|
298 |
- ((mod4Mask, xK_1), switchWorkspace "web" ), |
|
299 |
- ((mod4Mask, xK_2), switchWorkspace "terminal" ), |
|
300 |
- ((mod4Mask, xK_3), switchWorkspace "1" ), |
|
301 |
- ((mod4Mask, xK_4), switchWorkspace "2" ), |
|
302 |
- ((mod4Mask, xK_5), switchWorkspace "3" ), |
|
303 |
- ((mod4Mask, xK_6), switchWorkspace "4" ), |
|
304 |
- ((mod4Mask, xK_7), switchWorkspace "5" ), |
|
305 |
- ((mod4Mask, xK_8), switchWorkspace "6" ), |
|
306 |
- ((mod4Mask, xK_9), switchWorkspace "images" ), |
|
307 |
- ((mod4Mask, xK_grave), switchWorkspace "IM" ), |
|
308 |
- |
|
309 | 322 |
((mod4Mask .|. shiftMask, xK_1), copyNSwitch windows "web" ), |
310 | 323 |
((mod4Mask .|. shiftMask, xK_2), copyNSwitch windows "terminal" ), |
311 | 324 |
((mod4Mask .|. shiftMask, xK_3), copyNSwitch windows "1" ), |
... | ... |
@@ -315,41 +328,56 @@ main = do |
315 | 328 |
((mod4Mask .|. shiftMask, xK_7), copyNSwitch windows "5" ), |
316 | 329 |
((mod4Mask .|. shiftMask, xK_8), copyNSwitch windows "6" ), |
317 | 330 |
((mod4Mask .|. shiftMask, xK_9), copyNSwitch windows "images" ), |
318 |
- ((mod4Mask .|. shiftMask, xK_grave), shiftNSwitch windows "IM" ), |
|
319 |
- |
|
320 |
- ((mod4Mask .|. controlMask, xK_1), shiftNSwitch windows "web" ), |
|
321 |
- ((mod4Mask .|. controlMask, xK_2), shiftNSwitch windows "terminal" ), |
|
322 |
- ((mod4Mask .|. controlMask, xK_3), shiftNSwitch windows "1" ), |
|
323 |
- ((mod4Mask .|. controlMask, xK_4), shiftNSwitch windows "2" ), |
|
324 |
- ((mod4Mask .|. controlMask, xK_5), shiftNSwitch windows "3" ), |
|
325 |
- ((mod4Mask .|. controlMask, xK_6), shiftNSwitch windows "4" ), |
|
326 |
- ((mod4Mask .|. controlMask, xK_7), shiftNSwitch windows "5" ), |
|
327 |
- ((mod4Mask .|. controlMask, xK_8), shiftNSwitch windows "6" ), |
|
328 |
- ((mod4Mask .|. controlMask, xK_9), shiftNSwitch windows "images" ), |
|
329 |
- ((mod4Mask .|. controlMask, xK_grave), shiftNSwitch windows "IM" ), |
|
330 |
- |
|
331 |
+ ((mod4Mask .|. shiftMask, xK_backslash), maximizeSwitch), |
|
331 | 332 |
((mod4Mask .|. shiftMask, xK_BackSpace), removeWorkspace), |
332 |
- ((mod4Mask .|. shiftMask, xK_k), kill1), |
|
333 |
+ ((mod4Mask .|. shiftMask, xK_grave), shiftNSwitch windows "IM" ), |
|
333 | 334 |
((mod4Mask .|. shiftMask, xK_m), withWorkspace defaultXPConfig (windows . copy)), |
334 | 335 |
((mod4Mask .|. shiftMask, xK_n), addWorkspacePrompt defaultXPConfig), |
335 | 336 |
((mod4Mask .|. shiftMask, xK_Return), spawnHere "/usr/bin/x-terminal-emulator"), |
336 | 337 |
((mod4Mask .|. shiftMask, xK_r), renameWorkspace defaultXPConfig), |
338 |
+ ((mod4Mask .|. shiftMask, xK_t), kill1), |
|
337 | 339 |
((mod4Mask .|. shiftMask, xK_w), gridselectWorkspace defaultGSConfig (\ws -> greedyView ws . shift ws)), |
340 |
+ ((mod4Mask, xK_1), switchWorkspace "web" ), |
|
341 |
+ ((mod4Mask, xK_2), switchWorkspace "terminal" ), |
|
342 |
+ ((mod4Mask, xK_3), switchWorkspace "1" ), |
|
343 |
+ ((mod4Mask, xK_4), switchWorkspace "2" ), |
|
344 |
+ ((mod4Mask, xK_5), switchWorkspace "3" ), |
|
345 |
+ ((mod4Mask, xK_6), switchWorkspace "4" ), |
|
346 |
+ ((mod4Mask, xK_7), switchWorkspace "5" ), |
|
347 |
+ ((mod4Mask, xK_8), switchWorkspace "6" ), |
|
348 |
+ ((mod4Mask, xK_9), switchWorkspace "images" ), |
|
349 |
+ --((mod4Mask, xK_apostrophe), scratchpadSpawnActionTerminal "gvim"), |
|
350 |
+ ((mod4Mask, xK_backslash), withFocused (sendMessage . maximizeRestore)), |
|
338 | 351 |
((mod4Mask, xK_b), sendMessage ToggleStruts), |
339 | 352 |
((mod4Mask, xK_g), goToSelected defaultGSConfig), |
340 |
- ((mod4Mask, xK_KP_Subtract), spawn "/usr/bin/zsh /home/edwlan/bin/dmenu_queueplay_mpd"), |
|
341 |
- ((mod4Mask, xK_KP_Multiply), spawn "/usr/bin/zsh /home/edwlan/bin/dmenu_queue_mpd"), |
|
342 |
- ((mod4Mask, xK_KP_Divide), spawn "/usr/bin/zsh /home/edwlan/bin/dmenu_play_mpd"), |
|
353 |
+ --((mod4Mask, xK_grave), scratchpadSpawnActionTerminal "urxvt"), |
|
354 |
+ {-((mod4Mask, xK_grave), switchWorkspace "IM" ),-} |
|
343 | 355 |
((mod4Mask, xK_KP_Add), spawn "/usr/bin/zsh /home/edwlan/bin/dzen_mpc_status"), |
356 |
+ ((mod4Mask, xK_KP_Divide), spawn "/usr/bin/zsh /home/edwlan/bin/dmenu_play_mpd"), |
|
357 |
+ ((mod4Mask, xK_KP_Multiply), spawn "/usr/bin/zsh /home/edwlan/bin/dmenu_queue_mpd"), |
|
358 |
+ ((mod4Mask, xK_KP_Subtract), spawn "/usr/bin/zsh /home/edwlan/bin/dmenu_queueplay_mpd"), |
|
344 | 359 |
((mod4Mask, xK_p), spawnHere "/usr/bin/dmenu_run -f"), |
345 |
- |
|
346 | 360 |
((mod4Mask, xK_q), ((withSelectedWindow $ windows . W.focusWindow) defaultGSConfig) >> (windows $ W.shiftMaster)), |
347 | 361 |
((mod4Mask, xK_semicolon), nchooseLayout defaultGSConfig), |
348 | 362 |
((mod4Mask, xK_w), gridselectWorkspace defaultGSConfig (\ws -> greedyView ws)) |
349 |
- ] ++ zip (zip (repeat (mod4Mask)) ([xK_0])) (map (withNthWorkspace greedyView) [0..]) ++ |
|
350 |
- zip (zip (repeat (mod4Mask .|. shiftMask)) ([xK_0])) (map (withNthWorkspace copy) [0..]) |
|
351 |
- ++ zip (zip (repeat (mod4Mask)) (map (numPadKeys !!) ([0]))) (map (withNthWorkspace greedyView) [0..]) |
|
352 |
- ) |
|
363 |
+ ] |
|
364 |
+ ++ zip (zip (repeat (mod4Mask)) ([xK_0])) (map (withNthWorkspace greedyView) [0..]) |
|
365 |
+ ++ zip (zip (repeat (mod4Mask .|. shiftMask)) ([xK_0])) (map (withNthWorkspace copy) [0..]) |
|
366 |
+ ++ zip (zip (repeat (mod4Mask)) (map (numPadKeys !!) ([0]))) (map (withNthWorkspace greedyView) [0..]) |
|
367 |
+ ++ [ |
|
368 |
+ ((mod4Mask .|. mod1Mask, xK_1), namedScratchpadAction scratchpads "notes"), |
|
369 |
+ ((mod4Mask .|. mod1Mask, numPadKeys !! 1), namedScratchpadAction scratchpads "notes"), |
|
370 |
+ ((mod4Mask .|. mod1Mask, xK_2), namedScratchpadAction scratchpads "mutt"), |
|
371 |
+ ((mod4Mask .|. mod1Mask, numPadKeys !! 2), namedScratchpadAction scratchpads "mutt"), |
|
372 |
+ ((mod4Mask .|. mod1Mask, xK_3), namedScratchpadAction scratchpads "irc"), |
|
373 |
+ ((mod4Mask .|. mod1Mask, numPadKeys !! 3), namedScratchpadAction scratchpads "irc"), |
|
374 |
+ ((mod4Mask .|. mod1Mask, xK_4), namedScratchpadAction scratchpads "htop"), |
|
375 |
+ ((mod4Mask .|. mod1Mask, numPadKeys !! 4), namedScratchpadAction scratchpads "htop"), |
|
376 |
+ ((mod4Mask .|. mod1Mask, xK_5), namedScratchpadAction scratchpads "mpc"), |
|
377 |
+ ((mod4Mask .|. mod1Mask, numPadKeys !! 5), namedScratchpadAction scratchpads "mpc"), |
|
378 |
+ ((mod4Mask .|. mod1Mask, xK_6), namedScratchpadAction scratchpads "mcabber"), |
|
379 |
+ ((mod4Mask .|. mod1Mask, numPadKeys !! 6), namedScratchpadAction scratchpads "mcabber") |
|
380 |
+ ]) |
|
353 | 381 |
|
354 | 382 |
numPadKeys :: [KeySym] |
355 | 383 |
numPadKeys = [xK_KP_Insert -- 0 |
... | ... |
@@ -27,12 +27,13 @@ export MPD_HOST=srv2.elangley.org |
27 | 27 |
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) |
28 | 28 |
# Example format: plugins=(rails git textmate ruby lighthouse) |
29 | 29 |
fpath=(~/.zsh.d/completion ~/.zsh.d/functions $fpath) |
30 |
-plugins=(git ruby rails osx brew zsh-syntax-highlighting python git-extra git-flow battery) |
|
30 |
+plugins=(git rails osx brew zsh-syntax-highlighting python git-extra git-flow battery) |
|
31 | 31 |
|
32 | 32 |
source $ZSH/oh-my-zsh.sh |
33 | 33 |
unsetopt correct_all |
34 | 34 |
|
35 | 35 |
echo "done oh-my-zsh" |
36 |
+unalias sp |
|
36 | 37 |
|
37 | 38 |
# Customize to your needs... |
38 | 39 |
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/texbin:/usr/X11/bin:/opt/local/bin:/sbin/usr/sbin:$PATH |
... | ... |
@@ -51,7 +52,9 @@ elif [ -x /usr/games/fortune ]; then export FORTUNE=/usr/games/fortune |
51 | 52 |
else export FORTUNE=/usr/bin/fortune |
52 | 53 |
fi |
53 | 54 |
|
54 |
-$FORTUNE |
|
55 |
+if [ -x "$FORTUNE" ]; then |
|
56 |
+ $FORTUNE |
|
57 |
+fi |
|
55 | 58 |
|
56 | 59 |
function battery_charge() { |
57 | 60 |
python "$HOME/bin/batcharge.py" 2>/dev/null |
... | ... |
@@ -104,7 +107,7 @@ if [[ $TERM != "linux" ]]; then |
104 | 107 |
fi |
105 | 108 |
|
106 | 109 |
PATH=/home/edwlan/bin:/usr/local/bin:$PATH |
107 |
-export PATH="/opt/local/bin:/usr/sbin:/sbin/usr/sbin:/sbin:$HOME/.cabal/bin:$HOME/bin:/Developer/usr/bin:$PATH" |
|
110 |
+export PATH="/opt/local/bin:/usr/sbin:/sbin/usr/sbin:/sbin:$HOME/.cabal/bin:$HOME/.local/bin:$HOME/bin:/Developer/usr/bin:$PATH" |
|
108 | 111 |
export VIMCLOJURE_SERVER_JAR="$HOME/bin/jars/server-2.3.6.jar" |
109 | 112 |
export INFOPATH=/usr/local/share/info:/usr/local/texlive/2009/texmf/doc/info |
110 | 113 |
export SAVEHIST=10000000 |
... | ... |
@@ -169,7 +172,7 @@ zstyle ':completion:*' group-name '' |
169 | 172 |
zstyle ':completion:*' insert-unambiguous true |
170 | 173 |
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} |
171 | 174 |
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s |
172 |
-zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._]=** r:|=**' |
|
175 |
+zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._]=** r:|=**' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[-._]=** r:|=**' |
|
173 | 176 |
zstyle ':completion:*' menu select=0 |
174 | 177 |
zstyle ':completion:*' original false |
175 | 178 |
zstyle ':completion:*' prompt '%e errors:' |
... | ... |
@@ -381,34 +384,39 @@ psc() { |
381 | 384 |
} |
382 | 385 |
|
383 | 386 |
activate_env() { |
384 |
- if [[ -e bin/activate ]]; then |
|
385 |
- echo "sourcing local env: `pwd`/bin/activate" |
|
386 |
- source bin/activate |
|
387 |
- else |
|
388 |
- env=$1 |
|
389 |
- pushd $HOME/python_envs/ > /dev/null |
|
390 |
- |
|
391 |
- if [[ $env == "" ]]; then |
|
392 |
- counter=1 |
|
393 |
- typeset -A choices |
|
394 |
- unset choice |
|
395 |
- for x in `ls`; do |
|
396 |
- echo $counter\) $x |
|
397 |
- choices[$counter]=$x |
|
398 |
- (( counter++ )) |
|
399 |
- done |
|
400 |
- echo -n "your choice? " |
|
401 |
- choice=-1 |
|
402 |
- read choice |
|
403 |
- if [[ $choice == "" ]]; then |
|
404 |
- return |
|
405 |
- fi |
|
406 |
- env=$choices[$choice] |
|
407 |
- echo "you chose $env" |
|
408 |
- fi |
|
409 |
- source $env/bin/activate |
|
410 |
- popd > /dev/null |
|
411 |
- fi |
|
387 |
+ venv=. |
|
388 |
+ if [[ -e bin/activate ]]; then |
|
389 |
+ echo "sourcing local env: `pwd`/bin/activate" |
|
390 |
+ elif [[ -e venv/bin/activate ]]; then |
|
391 |
+ echo "sourcing local env: `pwd`/venv/bin/activate" |
|
392 |
+ venv=venv |
|
393 |
+ else |
|
394 |
+ env=$1 |
|
395 |
+ pushd $HOME/python_envs/ > /dev/null |
|
396 |
+ venv="$PWD/$env" |
|
397 |
+ popd |
|
398 |
+ |
|
399 |
+ if [[ $env == "" ]]; then |
|
400 |
+ counter=1 |
|
401 |
+ typeset -A choices |
|
402 |
+ unset choice |
|
403 |
+ for x in `ls "$venv"`; do |
|
404 |
+ echo $counter\) `basename $x` |
|
405 |
+ choices[$counter]=$x |
|
406 |
+ (( counter++ )) |
|
407 |
+ done |
|
408 |
+ echo -n "your choice? " |
|
409 |
+ choice=-1 |
|
410 |
+ read choice |
|
411 |
+ if [[ $choice == "" ]]; then |
|
412 |
+ return |
|
413 |
+ fi |
|
414 |
+ venv="$venv/$choices[$choice]" |
|
415 |
+ echo "you chose $venv" |
|
416 |
+ fi |
|
417 |
+ fi |
|
418 |
+ source $venv/bin/activate |
|
419 |
+ unset venv env; |
|
412 | 420 |
} |
413 | 421 |
alias ae=activate_env |
414 | 422 |
|
... | ... |
@@ -588,6 +596,10 @@ mkcd() { |
588 | 596 |
cd "$1" |
589 | 597 |
} |
590 | 598 |
|
599 |
+groot() { |
|
600 |
+ cd `git rev-parse --show-toplevel` |
|
601 |
+} |
|
602 |
+ |
|
591 | 603 |
### load my plugins |
592 | 604 |
|
593 | 605 |
for x in `ls $HOME/.zsh.d/*.zsh`; do |
... | ... |
@@ -595,6 +607,7 @@ for x in `ls $HOME/.zsh.d/*.zsh`; do |
595 | 607 |
done |
596 | 608 |
alias cn=current_news |
597 | 609 |
|
610 |
+#chruby ruby-2.2.2 |
|
598 | 611 |
# vim: set filetype=sh: |
599 | 612 |
|
600 | 613 |
#THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!! |
... | ... |
@@ -172,11 +172,11 @@ def e(name=None): |
172 | 172 |
f.close() |
173 | 173 |
|
174 | 174 |
def ls(name): |
175 |
- load_file = lambda: open('/Users/edwlan/sandbox/unsorted/pythonsnippets_%s.py' % name) |
|
175 |
+ load_file = lambda: open('/home/edwlan/sandbox/unsorted/pythonsnippets_%s.py' % name) |
|
176 | 176 |
try: |
177 | 177 |
f = load_file() |
178 | 178 |
except IOError: |
179 |
- load_file = lambda: open('/Users/edwlan/sandbox/%s.py' % name) |
|
179 |
+ load_file = lambda: open('/home/edwlan/sandbox/%s.py' % name) |
|
180 | 180 |
f = load_file() |
181 | 181 |
|
182 | 182 |
raw_input('loading %s, press Enter to continue...' % f.name) |
... | ... |
@@ -1 +0,0 @@ |
1 |
-print('hello') |