git.fiddlerwoaroof.com
Browse code

updating files

fiddlerwoaroof authored on 12/10/2016 21:58:55
Showing 8 changed files
... ...
@@ -9,6 +9,9 @@ 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
+bind m set -g mouse on
13
+bind m set -g mouse off
14
+
12 15
 # Open new windows/panes in same directory
13 16
 bind '"' split-window -c "#{pane_current_path}"
14 17
 bind % split-window -h -c "#{pane_current_path}"
... ...
@@ -198,6 +198,7 @@ zstyle ':completion:*' prompt '%e errors:'
198 198
 zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
199 199
 zstyle ':completion:*' use-compctl false
200 200
 
201
+export fpath=($HOME/.zsh.d/completion $fpath)
201 202
 autoload -Uz compinit
202 203
 
203 204
 compinit
... ...
@@ -514,10 +515,12 @@ PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
514 515
 
515 516
 export GOPATH=$HOME/go
516 517
 export PATH=$PATH:$GOPATH/bin
518
+export PATH=$HOME/vim8/bin:$PATH
517 519
 
518 520
 export CPATH=$CPATH:$HOME/include
519 521
 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/lib
520 522
 export VIMCLOJURE_SERVER_JAR="$HOME/lib/vimclojure/server-2.3.6.jar"
523
+export CLON_THEME=el
521 524
 
522 525
 pmkdir() {
523 526
   mkdir $1
... ...
@@ -543,7 +546,11 @@ export PROMPT
543 546
 set -o vi
544 547
 bindkey -M vicmd '?' history-incremental-search-backward
545 548
 
549
+#zprof
550
+
551
+export NVM_DIR="/home/edwlan/.nvm"
552
+[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
553
+
546 554
 #THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!!
547 555
 [[ -s "/Users/edwlan/.gvm/bin/gvm-init.sh" ]] && source "/Users/edwlan/.gvm/bin/gvm-init.sh"
548 556
 
549
-#zprof
... ...
@@ -1,4 +1,8 @@
1
-#!/usr/bin/env python3.4
1
+#!/usr/bin/env python3
2
+import gi
3
+gi.require_version('Gtk', '3.0')
4
+gi.require_version('WebKit', '3.0')
5
+
2 6
 from gi.repository import Gtk, WebKit
3 7
 import os.path
4 8
 print(__file__)
... ...
@@ -14,16 +14,19 @@ xmodmap $HOME/.xmodmap
14 14
 
15 15
 xsetroot -solid black
16 16
 xsetbg $HOME/.xmonad/cheatsheet.png
17
-if [ -e $HOME/Pictures/backgrund.png ]; then
17
+if [ -e $HOME/Pictures/background.png ]; then
18 18
    xloadimage -onroot -quiet $HOME/Pictures/background.png
19 19
 fi
20
-conky -bd
20
+
21
+conky -bd -a middle_left &
21 22
 
22 23
 xscreensaver -no-splash &
23 24
 
24 25
 
25 26
 # Set up an icon tray
26
-trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 10 --transparent true --tint 0x000000 --height 17 &
27
+#trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 10 --transparent true --tint 0x000000 --height 17 &
28
+
29
+#synergy
27 30
 synergys
28 31
 
29 32
 # notifications
... ...
@@ -51,7 +54,7 @@ $HOME/github_repos/shairport/shairport -a srv2 -o pulse -d | swap_variable SHAIR
51 54
 sonata --hidden &
52 55
 
53 56
 if [[ -x /usr/bin/nm-applet ]] ; then
54
-   nm-applet --sm-disable &
57
+  nm-applet --sm-disable &
55 58
 fi
56 59
 
57 60
 gnome-settings-daemon &
... ...
@@ -12,4 +12,4 @@ fi
12 12
 	else
13 13
 		/home/edwlan/.local/bin/yeganesh "$@" < "$cache"
14 14
 	fi
15
-) | ${SHELL:-"/bin/sh"} &
15
+)# | ${SHELL:-"/bin/sh"} &
... ...
@@ -1,19 +1,59 @@
1 1
 (in-package :stumpwm)
2 2
 
3
+
4
+(load-module "stumptray")
5
+(mode-line)
6
+(stumptray:stumptray)
7
+(setf *window-format* "%s%m%n: %15t")
8
+(setf *window-format-by-class* "%m%n %c %s%92t")
9
+
3 10
 (eval-when (:load-toplevel :compile-toplevel :execute)
11
+  (set-prefix-key (kbd "s-space"))
4 12
   (load "~/quicklisp/setup.lisp")
13
+  (ql:quickload :mpd-remote)
14
+  (ql:quickload :ubiquitous) 
5 15
   (ql:quickload :swank))
6 16
 
7 17
 (defcommand start-swank () ()
8
-  (swank:start-server :port 4587 :dont-close t))
9
-
10
-
11
-(set-prefix-key (kbd "s-space"))
18
+  "Start a swank server on port 4587"
19
+  (swank:create-server :port 4587 :dont-close nil))
20
+
21
+
22
+(defcommand pause-mpd () ()
23
+  "Pause MPD"
24
+  (mpd-remote:with-mpd-connection (so st)
25
+    (declare (ignorable so))
26
+    (mpd-remote:send-command st :pause)))
27
+
28
+(defcommand next-mpd () ()
29
+  "Next MPD"
30
+  (mpd-remote:with-mpd-connection (so st)
31
+    (declare (ignorable so))
32
+    (mpd-remote:send-command st :next)
33
+    (current-song)))
34
+
35
+(defcommand prev-mpd () ()
36
+  "Prev MPD"
37
+  (mpd-remote:with-mpd-connection (so st)
38
+    (declare (ignorable so))
39
+    (mpd-remote:send-command st :previous)
40
+    (current-song)))
41
+
42
+(defcommand current-song () ()
43
+  "Display information about the current song"
44
+  (mpd-remote:with-mpd-connection (so st)
45
+    (declare (ignorable so))
46
+    (let ((current-song (mpd-remote:send-command st :current-song)))
47
+      (message "~a ~a: ~a - ~a"
48
+	       (mpd-remote.song::track current-song)
49
+	       (mpd-remote.song::artist current-song)
50
+	       (mpd-remote.song::album current-song)
51
+	       (mpd-remote.song::title current-song)))))
12 52
 
13 53
 (defparameter *browser-command* "/usr/bin/google-chrome-beta")
14 54
 
15 55
 (defun cat (&rest strings)
16
-  (apply 'concatenate 'string strings))
56
+  (uiop:escape-sh-command strings))
17 57
 
18 58
 (defgeneric get-search-url (provider &rest strings)
19 59
   (:method-combination append :most-specific-last)
... ...
@@ -49,6 +89,11 @@
49 89
   (:lisp "lisp")
50 90
   (:wikipedia "w"))
51 91
 
92
+(defcommand slack-copy () ()
93
+  (ubiquitous:restore :atomampd-slack)
94
+  (push (get-x-selection) (ubiquitous:value :clip))
95
+  (ubiquitous:offload))
96
+
52 97
 (defcommand google (provider search-string) ((:string "Search Provider? ") (:string "Search Google for: "))
53 98
   "Search google for a given string"
54 99
   (check-type search-string (or null string))
... ...
@@ -84,11 +129,18 @@
84 129
   "Search for the x selection with provider"
85 130
   (do-search provider (get-x-selection)))
86 131
 
132
+(defcommand jira-ticket (number) ((:string "Ticket Number? "))
133
+  "get moi a jira ticket"
134
+  (unless (alpha-char-p (elt number 0))
135
+    (setf number (format nil "ATOMOS-~a" number)))
136
+  (run-shell-command #1=(cat *browser-command*
137
+			  (format nil "https://atomampd.atlassian.net/browse/~a" number))))
138
+
87 139
 (defparameter *selection-search-map* nil "selection search map")
88 140
 (fill-keymap *selection-search-map*
89
-             (kbd "g") "search-for-search google"
90
-             (kbd "/") "search-for-search google"
91
-             (kbd "s-/") "search-for-search google" 
141
+             (kbd "g") "search-for-selection google"
142
+             (kbd "/") "search-for-selection google"
143
+             (kbd "s-/") "search-for-selection google" 
92 144
              (kbd "l") "search-for-selection lisp")
93 145
 
94 146
 (defparameter *search-map* nil "search map")
... ...
@@ -107,8 +159,32 @@
107 159
              (kbd "Return") "search-for-selection google"
108 160
              (kbd "s-/") "do-search google")
109 161
 
162
+(defcommand run-yeganesh () ()
163
+  "Run Command given by yeganesh"
164
+  (let ((cmd (run-shell-command "/home/edwlan/bin/yeganesh_run" t)))
165
+    (run-shell-command cmd)))
166
+
167
+(define-key *top-map* (kbd "s-!") "run-yeganesh")
110 168
 (define-key *top-map* (kbd "s-/") *search-map*)
111 169
 (define-key *top-map* (kbd "s-TAB") "fnext")
112 170
 (define-key *top-map* (kbd "s-ISO_Left_Tab") "fother")
113 171
 
172
+(define-key *root-map* (kbd "\"") "windowlist-by-class")
173
+(define-key *root-map* (kbd "n") "next-in-frame")
174
+(define-key *root-map* (kbd "p") "prev-in-frame")
175
+
176
+(defparameter *passwords* '())
177
+(defcommand put-password (identifier) ((:string "Password Identifier? "))
178
+  "Put a password into a text-input"
179
+  (window-send-string (cdr (assoc (alexandria:make-keyword (string-upcase identifier))
180
+				  *passwords*))))
181
+(defcommand store-password (identifier password) ((:string "Password Identifier? ") (:string "Password? "))
182
+  "Store a password..."
183
+  (setf *passwords* (acons (alexandria:make-keyword (string-upcase identifier))
184
+			   password
185
+			   *passwords*))
186
+  "stored")
187
+
188
+;(defi)
189
+
114 190
 ; vim: set ft=lisp:
... ...
@@ -1,19 +1,25 @@
1 1
 let counter = 0
2
-let g:syntastic_auto_loc_list=1
3
-let g:sql_type_default = 'pgsql'
4 2
 let g:airline_theme="murmur"
3
+let g:easytags_async=1
4
+let g:easytags_by_filetype="~/.tags"
5 5
 let g:haddock_browser_callformat = "%s %s"
6 6
 let g:haddock_browser = "open"
7 7
 let g:lisp_rainbow=1
8
+"let g:pandoc#filetypes#handled = ["markdown", "rst", "textile"]
9
+"let g:pandoc_formatting_settings = "h"
10
+"let g:pandoc#modules#disabled =  ["command", "bibliographies"]
11
+"let g:pandoc#modules#enabled =  ["formatting", "folding", "completion", "metadata","menu"]
8 12
 "let g:pandoc_no_empty_implicits=1
9 13
 "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:phpcomplete_index_composer_command = "composer"
14 15
 let g:snips_author="Edward Langley"
15 16
 let g:solarized_termtrans=1
17
+let g:sql_type_default = 'pgsql'
18
+let g:syntastic_auto_loc_list=1
16 19
 let g:syntastic_python_checkers = ['python']
20
+let g:syntastic_scss_sass_args = "-r sass-css-importer -r susy"
21
+let g:syntastic_html_tidy_ignore_errors=[" proprietary attribute " ,"trimming empty <", "unescaped &" , "lacks \"action", "is not recognized!", "discarding unexpected", "attribute name \":", "attribute name \"@"]
22
+
17 23
 let g:Tex_CompileRule_pdf = 'xelatex -interaction=nonstopmode $*'
18 24
 let g:tex_flavor='xelatex'
19 25
 let g:unite_force_overwrite_statusline = 0
... ...
@@ -22,15 +28,13 @@ let g:vimclojure#HighlightBuiltins = 1
22 28
 let g:vimclojure#ParenRainbow = 1
23 29
 let g:vimclojure#ParenRainbow = 1
24 30
 let g:virtualenv_directory = "$HOME/python_envs"
25
-let g:phpcomplete_index_composer_command = "composer"
26 31
 let maplocalleader=','
27 32
 let $PAGER=''
28 33
 let python_highlight_all = 1
29 34
 let python_no_tab_space_error=1
30 35
 let python_space_errors=1
31 36
 let vimclojure#WantNailgun = 1
32
-let g:syntastic_scss_sass_args = "-r sass-css-importer -r susy"
33
-
37
+let g:assistant_show_help_shortcut=" K"
34 38
 " This goes here in case a filetype overrides it
35 39
 
36 40
 "NeoBundle Scripts-----------------------------
... ...
@@ -49,76 +53,84 @@ call neobundle#begin(expand("$HOME/.vim/bundle"))
49 53
 NeoBundleFetch 'Shougo/neobundle.vim'
50 54
 
51 55
 " My Bundles here:
52
-
53
-
54
-
56
+NeoBundle 'alvan/vim-assistant'
57
+NeoBundle 'posva/vim-vue'
58
+NeoBundle 'evidens/vim-twig'
59
+NeoBundle 'tpope/vim-fugitive'
60
+NeoBundle 'joonty/vdebug'
61
+NeoBundle 'shawncplus/phpcomplete.vim'
62
+NeoBundle 'editorconfig/editorconfig-vim'
63
+"NeoBundle 'lukaszb/vim-web-indent'
64
+NeoBundle 'KabbAmine/zeavim.vim'
55 65
 NeoBundle 'dbakker/vim-paragraph-motion'
56
- NeoBundle 'jceb/vim-editqf'
57
- NeoBundle 'mustache/vim-mustache-handlebars'
58
- NeoBundle 'davidoc/taskpaper.vim'
59
- NeoBundle 'altercation/vim-colors-solarized'
60
- NeoBundle 'bitc/vim-hdevtools'
61
- NeoBundle 'Blackrush/vim-gocode'
62
- NeoBundle 'bling/vim-airline'
63
- NeoBundle 'bling/vim-airline-themes'
64
- NeoBundle 'burnettk/vim-angular'
65
- NeoBundle 'christoomey/vim-tmux-navigator'
66
- NeoBundle 'curist/vim-angular-template'
67
- NeoBundle 'eagletmt/ghcmod-vim'
68
- NeoBundle 'eagletmt/neco-ghc'
69
- NeoBundle 'edsono/vim-matchit'
70
- "NeoBundle 'enomsg/vim-haskellConcealPlus'
71
- NeoBundle 'exu/pgsql.vim'
72
- NeoBundle 'fiddlerwoaroof/htmljinja'
73
- NeoBundle 'fiddlerwoaroof/vim-jinja'
74
- NeoBundle 'godlygeek/tabular'
75
- NeoBundle 'groenewege/vim-less'
76
- NeoBundle 'guns/vim-clojure-static'
77
- NeoBundle 'ivanov/vim-ipython'
78
- NeoBundle 'jmcantrell/vim-virtualenv'
79
- NeoBundle 'kien/rainbow_parentheses.vim'
80
- NeoBundle 'kovisoft/slimv'
81
- NeoBundle 'lukerandall/haskellmode-vim'
82
- "NeoBundle 'm2mdas/phpcomplete-extended'
83
- NeoBundle 'markcornick/vim-vagrant'
84
- NeoBundle 'matthewsimo/angular-vim-snippets'
85
- NeoBundle 'mattn/emmet-vim.git'
86
- NeoBundle 'msanders/snipmate.vim'
87
- NeoBundle 'othree/javascript-libraries-syntax.vim'
88
- NeoBundle 'pangloss/vim-javascript'
89
- NeoBundle 'raichoo/haskell-vim'
90
- NeoBundle 'rking/ag.vim' "Ag search utility
91
- NeoBundle 'rust-lang/rust.vim'
92
- NeoBundle 'scrooloose/nerdcommenter'
93
- NeoBundle 'scrooloose/nerdtree'
94
- NeoBundle 'scrooloose/syntastic'
95
- NeoBundle 'Shougo/unite.vim'
96
- NeoBundle 'Shougo/unite-outline'
97
- NeoBundle 'tsukkee/unite-tag'
98
- NeoBundle 'Shougo/vimfiler.vim'
99
- NeoBundle 'Shougo/vimproc'
100
- NeoBundle 'Shougo/vimshell.vim'
101
- NeoBundle 'sjl/gundo.vim'
102
- NeoBundle 'sjl/vitality.vim'
103
- NeoBundle 'sophacles/vim-bundle-mako'
104
- NeoBundle 'terryma/vim-multiple-cursors'
105
- NeoBundle 'tpope/vim-fireplace'
106
- NeoBundle 'tpope/vim-fugitive'
107
- NeoBundle 'tpope/vim-repeat'
108
- NeoBundle 'tpope/vim-surround'
109
- NeoBundle 'Twinside/vim-haskellFold'
110
- NeoBundle 'Twinside/vim-hoogle'
111
- "NeoBundle 'Valloric/YouCompleteMe'
112
- "NeoBundle 'vim-pandoc/vim-pandoc'
113
- NeoBundle 'vim-scripts/dbext.vim'
114
- NeoBundle 'vim-scripts/php.vim--Garvin'
115
- NeoBundle 'vim-scripts/pydoc.vim'
116
- NeoBundle 'vim-scripts/VimClojure'
117
- NeoBundle 'vim-voom/VOoM'
118
- NeoBundle 'ytsunetsune/unite-outline-euslisp'
119
- NeoBundle 'xolox/vim-misc'
120
- NeoBundle 'xolox/vim-easytags'
121
- NeoBundle 'majutsushi/tagbar'
66
+NeoBundle 'jceb/vim-editqf'
67
+"NeoBundle 'mustache/vim-mustache-handlebars'
68
+NeoBundle 'davidoc/taskpaper.vim'
69
+NeoBundle 'altercation/vim-colors-solarized'
70
+"NeoBundle 'bitc/vim-hdevtools'
71
+"NeoBundle 'Blackrush/vim-gocode'
72
+NeoBundle 'bling/vim-airline'
73
+NeoBundle 'bling/vim-airline-themes'
74
+"NeoBundle 'burnettk/vim-angular'
75
+NeoBundle 'christoomey/vim-tmux-navigator'
76
+"NeoBundle 'curist/vim-angular-template'
77
+"NeoBundle 'eagletmt/ghcmod-vim'
78
+"NeoBundle 'eagletmt/neco-ghc'
79
+NeoBundle 'edsono/vim-matchit'
80
+""NeoBundle 'enomsg/vim-haskellConcealPlus'
81
+"NeoBundle 'exu/pgsql.vim'
82
+"NeoBundle 'fiddlerwoaroof/htmljinja'
83
+"NeoBundle 'fiddlerwoaroof/vim-jinja'
84
+"NeoBundle 'godlygeek/tabular'
85
+"NeoBundle 'groenewege/vim-less'
86
+"NeoBundle 'guns/vim-clojure-static'
87
+NeoBundle 'ivanov/vim-ipython'
88
+NeoBundle 'jmcantrell/vim-virtualenv'
89
+NeoBundle 'kien/rainbow_parentheses.vim'
90
+NeoBundle 'kovisoft/slimv'
91
+"NeoBundle 'lukerandall/haskellmode-vim'
92
+""NeoBundle 'm2mdas/phpcomplete-extended'
93
+"NeoBundle 'markcornick/vim-vagrant'
94
+"NeoBundle 'matthewsimo/angular-vim-snippets'
95
+NeoBundle 'mattn/emmet-vim.git'
96
+NeoBundle 'msanders/snipmate.vim'
97
+""NeoBundle 'othree/javascript-libraries-syntax.vim'
98
+"NeoBundle 'pangloss/vim-javascript'
99
+NeoBundle 'gavocanov/vim-js-indent'
100
+"NeoBundle 'vim-scripts/JavaScript-Indent'
101
+NeoBundle 'jelera/vim-javascript-syntax'
102
+"NeoBundle 'raichoo/haskell-vim'
103
+NeoBundle 'rking/ag.vim' "Ag search utility
104
+NeoBundle 'rust-lang/rust.vim'
105
+NeoBundle 'scrooloose/nerdcommenter'
106
+NeoBundle 'scrooloose/nerdtree'
107
+NeoBundle 'scrooloose/syntastic'
108
+NeoBundle 'Shougo/unite.vim'
109
+NeoBundle 'Shougo/unite-outline'
110
+NeoBundle 'tsukkee/unite-tag'
111
+NeoBundle 'Shougo/vimfiler.vim'
112
+NeoBundle 'Shougo/vimproc'
113
+"NeoBundle 'Shougo/vimshell.vim'
114
+NeoBundle 'sjl/gundo.vim'
115
+"NeoBundle 'sjl/vitality.vim'
116
+"NeoBundle 'sophacles/vim-bundle-mako'
117
+NeoBundle 'terryma/vim-multiple-cursors'
118
+"NeoBundle 'tpope/vim-fireplace'
119
+NeoBundle 'tpope/vim-repeat'
120
+NeoBundle 'tpope/vim-surround'
121
+"NeoBundle 'Twinside/vim-haskellFold'
122
+"NeoBundle 'Twinside/vim-hoogle'
123
+""NeoBundle 'Valloric/YouCompleteMe'
124
+""NeoBundle 'vim-pandoc/vim-pandoc'
125
+"NeoBundle 'vim-scripts/dbext.vim'
126
+"NeoBundle 'vim-scripts/php.vim--Garvin'
127
+"NeoBundle 'vim-scripts/pydoc.vim'
128
+"NeoBundle 'vim-scripts/VimClojure'
129
+NeoBundle 'vim-voom/VOoM'
130
+NeoBundle 'ytsunetsune/unite-outline-euslisp'
131
+NeoBundle 'xolox/vim-misc'
132
+NeoBundle 'xolox/vim-easytags'
133
+NeoBundle 'majutsushi/tagbar'
122 134
 
123 135
 
124 136
 " Required:
... ...
@@ -201,7 +213,7 @@ au BufWrite /private/etc/pw.* set nowritebackup
201 213
 set omnifunc=syntaxcomplete#Complete
202 214
 set ignorecase
203 215
 set smartcase
204
-set autoindent
216
+"set autoindent
205 217
 set nu
206 218
 set expandtab
207 219
 set tabstop=3 softtabstop=2
... ...
@@ -229,20 +241,20 @@ set backspace=2      " more powerful backspacing
229 241
 syntax enable
230 242
 colorscheme solarized
231 243
 
232
-if &term =~ "xterm\\|rxvt"
233
-  " use an orange cursor in insert mode
234
-  let &t_SI = "\<Esc>]12;blue\x7"
235
-  " use a red cursor otherwise
236
-  let &t_EI = "\<Esc>]12;yellow\x7"
237
-  silent !echo -ne "\033]12;yellow\007"
238
-  " reset cursor when vim exits
239
-  autocmd VimLeave * silent !echo -ne "\033]112\007"
240
-  " use \003]12;gray\007 for gnome-terminal
241
-endif
242
-
243
-"SmartIndent for Python
244
-autocmd BufEnter *.hs compiler ghc
245
-au FocusLost * :wa
244
+"if &term =~ "xterm\\|rxvt"
245
+"  " use an orange cursor in insert mode
246
+"  let &t_SI = "\<Esc>]12;blue\x7"
247
+"  " use a red cursor otherwise
248
+"  let &t_EI = "\<Esc>]12;yellow\x7"
249
+"  silent !echo -ne "\033]12;yellow\007"
250
+"  " reset cursor when vim exits
251
+"  autocmd VimLeave * silent !echo -ne "\033]112\007"
252
+"  " use \003]12;gray\007 for gnome-terminal
253
+"endif
254
+
255
+""SmartIndent for Python
256
+"autocmd BufEnter *.hs compiler ghc
257
+"au FocusLost * :wa
246 258
 
247 259
 function Checkft()
248 260
   if &filetype==""
... ...
@@ -254,14 +266,14 @@ endfunction
254 266
 " when we reload, tell vim to restore the cursor to the saved position
255 267
 "autocmd FileType python map K \pW
256 268
 autocmd! BufNewFile * silent! 0r ~/.vim/skel/tmpl.%:e
257
-autocmd BufRead,BufNewFile *.twig set filetype=htmljinja
258
-autocmd BufRead,BufNewFile *.mako set ft=mako
259
-autocmd BufRead,BufNewFile *.md set dictionary+=/usr/share/dict/words ft=markdown
260
-autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
261
-autocmd BufRead,BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
262
-autocmd BufRead,BufNewFile *.tac set ft=python
269
+"autocmd BufRead,BufNewFile *.twig set filetype=htmljinja
270
+"autocmd BufRead,BufNewFile *.mako set ft=mako
271
+"autocmd BufRead,BufNewFile *.md set dictionary+=/usr/share/dict/words ft=markdown
272
+"autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
273
+"autocmd BufRead,BufNewFile *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
274
+"autocmd BufRead,BufNewFile *.tac set ft=python
263 275
 autocmd bufwritepost * call Checkft()
264
-autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
276
+"autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
265 277
 
266 278
 "autocmd FileType haskell set omnifunc=necoghc#omnifunc
267 279
 autocmd FileType lisp set omnifunc=SlimvOmniComplete
... ...
@@ -300,10 +312,10 @@ map ZX :wq<cr>
300 312
 map ZZ :w<CR>
301 313
 
302 314
 nmap <Leader>ci <Plug>VCSCommit
303
-nnoremap <C-H> <C-W><C-H>
304
-nnoremap <C-J> <C-W><C-J>
305
-nnoremap <C-K> <C-W><C-K>
306
-nnoremap <C-L> <C-W><C-L>
315
+nnoremap <C-h> <C-W><C-H>
316
+nnoremap <C-j> <C-W><C-J>
317
+nnoremap <C-k> <C-W><C-K>
318
+nnoremap <C-l> <C-W><C-L>
307 319
 nnoremap <F2> :set nonumber!<CR>:set foldcolumn=0<CR>
308 320
 
309 321
 python << EOF
... ...
@@ -385,24 +397,37 @@ endif
385 397
 
386 398
 nnoremap [unite] <Nop>
387 399
 nmap <space> [unite]
388
-nmap [unite]s :<C-u>Unite -auto-preview grep:.<C-m>
389
-nmap [unite]o :<C-u>Unite outline -start-insert<C-m>
390
-nmap  [unite]f  :<C-u>Unite file_rec/async -start-insert<C-m>
391
-nmap  [unite]F  :<C-u>Unite file -start-insert<C-m>
392
-nmap  [unite]g  :<C-u>Unite file_rec/git -start-insert<C-m>
393
-nmap [unite]j :<C-u>Unite buffer -start-insert<C-m>
394
-nmap [unite]k :<C-u>Unite tab:no-current<C-m>
395
-nmap [unite]t :NERDTreeToggle<CR>
396
-nmap [unite]u :GundoToggle<CR>
397
-nmap [unite]r :!vagrant rsync<CR>
398
-nmap [unite]h :set hlsearch!<CR>
399
-nmap [unite]l :set list!<CR>
400
+
401
+nmap                 [unite]s :<C-u>Unite -auto-preview grep:.<C-m>
402
+nmap                 [unite]o :<C-u>Unite outline -start-insert<C-m>
403
+nmap                 [unite]f :<C-u>Unite file_rec/async -start-insert<C-m>
404
+nmap                 [unite]F :<C-u>Unite file -start-insert<C-m>
405
+nmap                 [unite]g :<C-u>Unite file_rec/git -start-insert<C-m>
406
+nmap                 [unite]j :<C-u>Unite buffer -start-insert<C-m>
407
+nmap                 [unite]k :<C-u>Unite tab:no-current<C-m>
408
+
409
+nmap                 [unite]t :NERDTreeToggle<CR>
410
+nmap                 [unite]u :GundoToggle<CR>
411
+"nmap                 [unite]r :!vagrant rsync<CR>
412
+nmap                 [unite]h :set hlsearch!<CR>
413
+nmap                 [unite]l :set list!<CR>
414
+nmap <silent> <expr> [unite]z FS_ToggleFoldAroundSearch({'context':2})
415
+nmap          <expr> [unite]x FS_ToggleFoldAroundSearch({'context':0})
416
+nmap                 [unite]w :let @/='\<<C-r><C-w>\>'<CR>:set hlsearch<CR>
417
+nmap                 [unite]r :s/<C-r><C-w>/<C-r>=input('replacement? ').'/g'<CR>
418
+nmap                 [unite]R :%s/<C-r><C-w>/<C-r>=input('replacement? ').'/g'<CR>
419
+
420
+nmap                 <C-x>o <C-w><C-w>
421
+
422
+:autocmd BufRead,BufNewFile .vimrc nmap [unite]1 /\(["].*\)\@<!\<[ni]\?\(no\)\?\(re\)\?map\><cr> x
400 423
 
401 424
 " Reload
402 425
 map <silent> tu :call GHC_BrowseAll()<CR>
403 426
 " Type Lookup
404 427
 map <silent> tw :call GHC_ShowType(1)<CR>
405 428
 autocmd BufRead,BufNewFile *.css,*.scss,*.less setlocal foldmethod=marker foldmarker={,}
429
+autocmd BufRead,BufNewFile *.php setlocal breakindent breakindentopt=sbr,shift:7,min:5
406 430
 
407 431
 command -nargs=+ Gadd Git add <q-args>
408 432
 " set runtimepath+=/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/vim
433
+au BufNewFile,BufRead *.phn set filetype=clojure
... ...
@@ -1,23 +1,66 @@
1
+GIT_DEBUG=0
2
+
3
+git-ufgrep() {
4
+  PATTERN="$1"
5
+  if [[ ${PATTERN}x == ""x ]]; then
6
+    PATTERN='.*'
7
+  fi
8
+  PATTERN="${PATTERN//\//\\/}"
9
+
10
+  if [[ "$GIT_DEBUG" == 1 ]]; then
11
+    echo "$PATTERN"
12
+  fi
13
+
14
+  git status --porcelain | awk '$1 == "??" && $2 ~ /[.]'"$PATTERN"'$/'
15
+}
16
+
17
+git-run() {
18
+  (
19
+    DIR="$1"
20
+    shift
21
+    git cd "$DIR"
22
+    exec "$@"
23
+  )
24
+}
25
+
26
+git-back() {
27
+  git checkout -
28
+}
29
+
30
+git-ff() {
31
+  git pull --ff-only
32
+}
33
+
1 34
 git-root() {
2
-  cd `git rev-parse --show-toplevel`
35
+  git rev-parse --show-toplevel
36
+}
37
+
38
+git-ag() {
39
+  ag "$@" -- $(git-root)
3 40
 }
4
-alias groot=git-root
41
+
42
+git-cd() {
43
+  cd "$(git-root)/$1"
44
+}
45
+alias groot=git-cd
5 46
 
6 47
 is-function () {
7 48
   whence -w $1 | grep --color=auto -I function > /dev/null
8 49
 }
9 50
 
10
-GIT_CMD="`which git 2>/dev/null`"
51
+GIT_CMD="`which -p git 2>/dev/null`"
11 52
 
12 53
 if [[ "$GIT_CMD"x != ""x ]]; then
13 54
   # git wrapper that mimics the functionality of git for commandlets but also
14 55
   # searches shell functions.
15
-  g() {
56
+  git() {
16 57
     POSSIBLE_CMD="git-$1"
17 58
     if is-function $POSSIBLE_CMD; then
18 59
       $POSSIBLE_CMD "${@[2,-1]}"
19 60
     else
20
-      git "$@"
61
+      $GIT_CMD "$@"
21 62
     fi
22 63
   }
23 64
 fi
65
+
66
+