bdcdc5452cc3

Force correct background color on SpellCap.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 08 Mar 2012 10:38:41 -0500
parents 5111987c9235
children de63c68eb82c
branches/tags (none)
files .hgsub .hgsubstate keymando/keymandorc.rb tmux/tmux.conf vim/.vimrc

Changes

--- a/.hgsub	Tue Mar 06 12:13:42 2012 -0500
+++ b/.hgsub	Thu Mar 08 10:38:41 2012 -0500
@@ -18,7 +18,6 @@
 vim/bundle/slimv = [hg]https://bitbucket.org/sjl/slimv
 vim/bundle/threesome = [hg]https://bitbucket.org/sjl/threesome.vim
 vim/bundle/vim-makegreen = [git]git://github.com/sjl/vim-makegreen.git
-vim/bundle/vim-coffee-script = [git]https://github.com/kchmck/vim-coffee-script.git
 vim/bundle/supertab = [git]git://github.com/ervandew/supertab.git
 vim/bundle/linediff = [git]git://github.com/AndrewRadev/linediff.vim.git
 vim/bundle/indent-object = [git]git://github.com/michaeljsmith/vim-indent-object.git
@@ -29,5 +28,6 @@
 vim/bundle/powerline = [git]git://github.com/Lokaltog/vim-powerline.git
 vim/bundle/yankring = [git]git://github.com/vim-scripts/YankRing.vim.git
 vim/bundle/badwolf = [hg]https://bitbucket.org/sjl/badwolf/
+vim/bundle/tslime = [git]git://github.com/sjl/tslime.vim.git
 
 keymando/Plugins/abbrev = [git]git://github.com/keymando/abbrev.git
--- a/.hgsubstate	Tue Mar 06 12:13:42 2012 -0500
+++ b/.hgsubstate	Thu Mar 08 10:38:41 2012 -0500
@@ -2,7 +2,7 @@
 4d95cb18a3b420154ef978c53de1d2e692f8343d mercurial/templates
 d2bb7878622e4c16203acf1c92a0f4bc7ac58003 vim/bundle/AnsiEsc.vim
 a41d5d52c39a31128e969e69acf800b198cb07f9 vim/bundle/ack
-a9983b93bc23cbe81b9a5c92d5876251c47a7ac7 vim/bundle/badwolf
+6073c4e56185776c0fc6a363612d729c6975404c vim/bundle/badwolf
 93cb20dbfbab723e1557801469ae70f4f46499da vim/bundle/ctrlp
 667a668e114e9ec0e5d4cbcb0962d835b23614c4 vim/bundle/easymotion
 03e138c3496926b193402f4e1542f0a99924f999 vim/bundle/fugitive
@@ -16,14 +16,14 @@
 d6da78f985e99d8388cd55db2587b19abc0628c2 vim/bundle/powerline
 d27022dc0bf2302cf31015d1ca0a2f80d55f3596 vim/bundle/python-mode
 fa3563dda862c1dc46ddac32d8a9f939e9077379 vim/bundle/rainbow-parentheses
-6cbccd24e335319cddd96b152f6d480912375039 vim/bundle/slimv
+9bbaa62571c2324160c8b901bf2cadfd69f7afce vim/bundle/slimv
 c6197a10ace82e0fe0c08e5cf5c017b7069a978e vim/bundle/sparkup
 6eec2c131213850ed65fd6da494dfd1a0d620a4e vim/bundle/strftimedammit
-ac395b57fec47f034cba151d01669d134ac7041b vim/bundle/supertab
+b8a34a485dfdda1f88a2290c8e4b611556cc2fc4 vim/bundle/supertab
 4eb2cdfccc016889acfa3b5d63e8f390a87863cf vim/bundle/surround
 2616623bb9208c4bf2559b6aa5c1eff53644a0f7 vim/bundle/syntastic
 bbc5193de145ba5334cf02693d959f475a3e850b vim/bundle/threesome
-b944e534bd6bbfc4fd56d4ee1a8aa831188387b0 vim/bundle/vim-coffee-script
+8b551fcb75170ffb5554a3b8bb456b4d8bae1020 vim/bundle/tslime
 62b72580aba57cb5185bd077ac7a905c1c6893ea vim/bundle/vim-commentary
 6362ba99c825afc046818807267d5c1143b5c887 vim/bundle/vim-javascript
 f21fbd8759d7fa6c3cb1bbb9fe05eae90422f01a vim/bundle/vim-makegreen
--- a/keymando/keymandorc.rb	Tue Mar 06 12:13:42 2012 -0500
+++ b/keymando/keymandorc.rb	Thu Mar 08 10:38:41 2012 -0500
@@ -10,9 +10,8 @@
 # Application Switching ------------------------------------------------------------
 map "<Ctrl-Shift-J>", lambda { activate('Firefox') }
 map "<Ctrl-Shift-P>", lambda { activate('Pixelmator') }
-map "<Ctrl-Shift-B>", lambda { activate('Pixen') }
-map "<Ctrl-Shift-K>", lambda { activate('MacVim') }
-map "<Ctrl-Shift-H>", lambda { activate('iTerm') }
+map "<Ctrl-Shift-H>", lambda { activate('Pixen') }
+map "<Ctrl-Shift-K>", lambda { activate('iTerm') }
 map "<Ctrl-Shift-O>", lambda { activate('Rdio') }
 map "<Ctrl-Shift-Y>", lambda { activate('Twitter') }
 
--- a/tmux/tmux.conf	Tue Mar 06 12:13:42 2012 -0500
+++ b/tmux/tmux.conf	Thu Mar 08 10:38:41 2012 -0500
@@ -91,8 +91,10 @@
 
 # Copy mode
 setw -g mode-keys vi
-bind [ copy-mode
+bind ` copy-mode
+unbind [
 unbind p
 bind p paste-buffer
 bind -t vi-copy v begin-selection
 bind -t vi-copy y copy-selection
+bind -t vi-copy Escape cancel
--- a/vim/.vimrc	Tue Mar 06 12:13:42 2012 -0500
+++ b/vim/.vimrc	Thu Mar 08 10:38:41 2012 -0500
@@ -14,6 +14,7 @@
 
 " }}}
 " Basic options ----------------------------------------------------------- {{{
+
 set encoding=utf-8
 set modelines=0
 set autoindent
@@ -235,22 +236,17 @@
 " Made D behave
 nnoremap D d$
 
-" Keep search matches in the middle of the window and pulse the line when moving
-" to them.
+" Don't move on *
+nnoremap * *<c-o>
+
+" Keep search matches in the middle of the window.
 nnoremap n nzzzv
 nnoremap N Nzzzv
 
-" Don't move on *
-nnoremap * *<c-o>
-
 " Same when jumping around
 nnoremap g; g;zz
 nnoremap g, g,zz
 
-" Window resizing
-nnoremap <c-left> 5<c-w>>
-nnoremap <c-right> 5<c-w><
-
 " Easier to type, and I never use the default behavior.
 noremap H ^
 noremap L g_
@@ -260,10 +256,10 @@
 inoremap <c-e> <esc>A
 
 " Open a Quickfix window for the last search.
-nnoremap <silent> <leader>/ :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
+nnoremap <silent> <leader>? :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
 
 " Ack for the last search.
-nnoremap <silent> <leader>? :execute "Ack! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
+nnoremap <silent> <leader>/ :execute "Ack! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
 
 " Fix linewise visual selection of various text objects
 nnoremap VV V
@@ -272,23 +268,6 @@
 nnoremap Vab vabV
 nnoremap VaB vaBV
 
-" Error navigation {{{
-"
-"             Location List     QuickFix Window
-"            (e.g. Syntastic)     (e.g. Ack)
-"            ----------------------------------
-" Next      |     M-j               M-Down     |
-" Previous  |     M-k                M-Up      |
-"            ----------------------------------
-"
-nnoremap ∆ :lnext<cr>zvzz
-nnoremap ˚ :lprevious<cr>zvzz
-inoremap ∆ <esc>:lnext<cr>zvzz
-inoremap ˚ <esc>:lprevious<cr>zvzz
-nnoremap <m-Down> :cnext<cr>zvzz
-nnoremap <m-Up> :cprevious<cr>zvzz
-
-" }}}
 " Directional Keys {{{
 
 " It's 2011.
@@ -330,9 +309,6 @@
 
 set foldlevelstart=0
 
-" Make the current location sane.
-nnoremap <c-cr> zvzt
-
 " Space to toggle folds.
 nnoremap <Space> za
 vnoremap <Space> za
@@ -408,9 +384,6 @@
 
     au BufNewFile,BufRead *.cljs set filetype=clojurescript
     au FileType clojurescript call TurnOnClojureFolding()
-
-    " Send current toplevel form to dtach.
-    au FileType clojurescript nnoremap <buffer> \ee mz:call SelectToplevelForm()<cr>:call SendToDtach(1)<cr>`z
 augroup END
 
 " }}}
@@ -437,7 +410,6 @@
     au Syntax cram setlocal foldlevel=1
 augroup END
 
-
 " }}}
 " CSS and LessCSS {{{
 
@@ -539,15 +511,6 @@
     " Use <localleader>t to fold the current templatetag.
     au FileType html,jinja,htmldjango nmap <buffer> <localleader>t viikojozf
 
-    " Use Shift-Return to turn this:
-    "     <tag>|</tag>
-    "
-    " into this:
-    "     <tag>
-    "         |
-    "     </tag>
-    au FileType html,jinja,htmldjango nnoremap <buffer> <s-cr> vit<esc>a<cr><esc>vito<esc>i<cr><esc>
-
     " Smarter pasting
     au FileType html,jinja,htmldjango nnoremap <buffer> p :<C-U>YRPaste 'p'<CR>v`]=`]
     au FileType html,jinja,htmldjango nnoremap <buffer> P :<C-U>YRPaste 'P'<CR>v`]=`]
@@ -561,7 +524,7 @@
     au FileType jinja,htmldjango inoremap <buffer> <c-t> {%<space><space>%}<left><left><left>
 
     " Django variables
-    au FileType jinja,htmldjango inoremap <buffer> <c-f> {{<space><space>}}<left><left><left>
+    au FileType jinja,htmldjango inoremap <buffer> <c-k> {{<space><space>}}<left><left><left>
 augroup END
 
 " }}}
@@ -678,7 +641,7 @@
     au FileType python if exists("python_space_error_highlight") | unlet python_space_error_highlight | endif
 
     " Jesus, Python.  Five characters of punctuation for a damn string?
-    au FileType python inoremap <buffer> <d-'> _(u'')<left><left>
+    au FileType python inoremap <buffer> <c-g> _(u'')<left><left>
 
     au FileType python inoremap <buffer> <c-b> """"""<left><left><left>
 augroup END
@@ -712,16 +675,6 @@
 augroup END
 
 " }}}
-" Scheme {{{
-
-augroup ft_scheme
-    au!
-
-    " Send current toplevel form to dtach.
-    au FileType scheme nnoremap <buffer> \ee mz:call SelectToplevelForm()<cr>:call SendToDtach(1)<cr>`z
-augroup END
-
-" }}}
 " Vagrant {{{
 
 augroup ft_vagrant
@@ -762,9 +715,9 @@
 " the tags file with sed and strip them out myself.
 "
 " Sigh.
-nnoremap <leader><cr> :silent !/usr/local/bin/ctags -R . && sed -i .bak -E -e '/^[^	]+	[^	]+.py	.+v$/d' tags<cr>
+nnoremap <leader><cr> :silent !/usr/local/bin/ctags -R . && sed -i .bak -E -e '/^[^	]+	[^	]+.py	.+v$/d' tags<cr>:redraw!<cr>
 
-" Highlight Group
+" Highlight Group(s)
 nnoremap <F8> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
 \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
 \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
@@ -802,14 +755,6 @@
 " HTML tag closing
 inoremap <C-_> <Space><BS><Esc>:call InsertCloseTag()<cr>a
 
-" Align text
-nnoremap <leader>Al :left<cr>
-nnoremap <leader>Ac :center<cr>
-nnoremap <leader>Ar :right<cr>
-vnoremap <leader>Al :left<cr>
-vnoremap <leader>Ac :center<cr>
-vnoremap <leader>Ar :right<cr>
-
 " Less chording
 nnoremap ; :
 
@@ -821,9 +766,6 @@
 vnoremap <leader>S y:execute @@<cr>
 nnoremap <leader>S ^vg_y:execute @@<cr>
 
-" Replaste
-nnoremap <D-p> "_ddPV`]=
-
 " Marks and Quotes
 noremap ' `
 noremap æ '
@@ -833,9 +775,6 @@
 " Great for pasting Python lines into REPLs.
 nnoremap vv ^vg_
 
-" Calculator
-inoremap <C-B> <C-O>yiW<End>=<C-R>=<C-R>0<CR>
-
 " Better Completion
 set completeopt=longest,menuone,preview
 
@@ -860,35 +799,35 @@
 " Toggle paste
 set pastetoggle=<F6>
 
-" Quickreturn
-inoremap <c-cr> <esc>A<cr>
-inoremap <s-cr> <esc>A:<cr>
-
 " Toggle [i]nvisible characters
 nnoremap <leader>i :set list!<cr>
 
 " Drag Lines {{{
 
-noremap <D-j> :m+<CR>
-noremap <D-k> :m-2<CR>
-inoremap <D-j> <Esc>:m+<CR>
-inoremap <D-k> <Esc>:m-2<CR>
-vnoremap <D-j> :m'>+<CR>gv
-vnoremap <D-k> :m-2<CR>gv
+" <m-j> and <m-k> to drag lines in any mode
+noremap ∆ :m+<CR>
+noremap ˚ :m-2<CR>
+inoremap ∆ <Esc>:m+<CR>
+inoremap ˚ <Esc>:m-2<CR>
+vnoremap ∆ :m'>+<CR>gv
+vnoremap ˚ :m-2<CR>gv
 
 " }}}
 " Easy filetype switching {{{
+
 nnoremap _md :set ft=markdown<CR>
 nnoremap _hd :set ft=htmldjango<CR>
 nnoremap _jt :set ft=htmljinja<CR>
 nnoremap _cw :set ft=confluencewiki<CR>
 nnoremap _pd :set ft=python.django<CR>
 nnoremap _d  :set ft=diff<CR>
+
 " }}}
 " Insert Mode Completion {{{
 
 inoremap <c-l> <c-x><c-l>
 inoremap <c-f> <c-x><c-f>
+inoremap <c-]> <c-x><c-]>
 
 " }}}
 " Quick editing {{{
@@ -901,6 +840,7 @@
 nnoremap <leader>em <C-w>v<C-w>j:e ~/.mutt/muttrc<cr>
 nnoremap <leader>ez <C-w>v<C-w>j:e ~/lib/dotfiles/zsh<cr>4j
 nnoremap <leader>ek <C-w>v<C-w>j:e ~/lib/dotfiles/keymando/keymandorc.rb<cr>
+nnoremap <leader>et <C-w>v<C-w>j:e ~/.tmux.conf<cr>
 
 " }}}
 
@@ -909,7 +849,7 @@
 
 " Ack {{{
 
-map <leader>a :Ack! 
+nnoremap <leader>a :Ack!<space>
 
 " }}}
 " Autoclose {{{
@@ -921,7 +861,11 @@
 
 nmap <leader>c <Plug>CommentaryLine
 xmap <leader>c <Plug>Commentary
-au FileType htmldjango setlocal commentstring={#\ %s\ #}
+
+augroup plugin_commentary
+    au!
+    au FileType htmldjango setlocal commentstring={#\ %s\ #}
+augroup END
 
 " }}}
 " Ctrl-P {{{
@@ -948,14 +892,14 @@
     \ "jar|class|swp|swo|log|so|o|pyc|jpe?g|png|gif|mo|po" .
     \ ")$' | " .
     \ "egrep -v '^(\\./)?(" .
-    \ "deploy/|lib/|classes/|libs/|deploy/vendor/|.git/|.hg/|.svn/|.*migrations/" . 
+    \ "deploy/|lib/|classes/|libs/|deploy/vendor/|.git/|.hg/|.svn/|.*migrations/" .
     \ ")'"
 
-let my_ctrlp_user_command = "" . 
+let my_ctrlp_user_command = "" .
     \ "find %s '(' -type f -or -type l ')' -maxdepth 15 -not -path '*/\\.*/*' | " .
     \ ctrlp_filter_greps
 
-let my_ctrlp_git_command = "" . 
+let my_ctrlp_git_command = "" .
     \ "cd %s && git ls-files | " .
     \ ctrlp_filter_greps
 
@@ -1007,6 +951,7 @@
 " Gundo {{{
 
 nnoremap <F5> :GundoToggle<CR>
+
 let g:gundo_debug = 1
 let g:gundo_preview_bottom = 1
 let g:gundo_tree_statusline = "Gundo"
@@ -1056,8 +1001,10 @@
     au Filetype nerdtree nnoremap <buffer> K :q<cr>
 augroup END
 
-let NERDTreeHighlightCursorline=1
-let NERDTreeIgnore = ['.vim$', '\~$', '.*\.pyc$', 'pip-log\.txt$', 'whoosh_index', 'xapian_index', '.*.pid', 'monitor.py', '.*-fixtures-.*.json', '.*\.o$', 'db.db', 'tags.bak']
+let NERDTreeHighlightCursorline = 1
+let NERDTreeIgnore = ['.vim$', '\~$', '.*\.pyc$', 'pip-log\.txt$', 'whoosh_index',
+                    \ 'xapian_index', '.*.pid', 'monitor.py', '.*-fixtures-.*.json',
+                    \ '.*\.o$', 'db.db', 'tags.bak']
 
 let NERDTreeMinimalUI = 1
 let NERDTreeDirArrows = 1
@@ -1146,15 +1093,15 @@
 
 command! ScratchToggle call ScratchToggle()
 
-function! ScratchToggle() " {{{
-  if exists("w:is_scratch_window")
-    unlet w:is_scratch_window
-    exec "q"
-  else
-    exec "normal! :Sscratch\<cr>\<C-W>J:resize 13\<cr>"
-    let w:is_scratch_window = 1
-  endif
-endfunction " }}}
+function! ScratchToggle()
+    if exists("w:is_scratch_window")
+        unlet w:is_scratch_window
+        exec "q"
+    else
+        exec "normal! :Sscratch\<cr>\<C-W>J:resize 13\<cr>"
+        let w:is_scratch_window = 1
+    endif
+endfunction
 
 nnoremap <silent> <leader><tab> :ScratchToggle<cr>
 
@@ -1213,6 +1160,14 @@
 let g:threesome_wrap = "nowrap"
 
 " }}}
+" tslime {{{
+
+let g:tslime_ensure_trailing_newlines = 1
+let g:tslime_normal_mapping = '<localleader>t'
+let g:tslime_visual_mapping = '<localleader>t'
+let g:tslime_vars_mapping = '<localleader>T'
+
+" }}}
 " VimClojure {{{
 
 let vimclojure#HighlightBuiltins = 1
@@ -1228,7 +1183,6 @@
     omap <expr> H YRMapsExpression("", "^")
 endfunction
 
-
 " }}}
 
 " }}}
@@ -1282,9 +1236,9 @@
 
 " Show the stack of syntax hilighting classes affecting whatever is under the
 " cursor.
-function! SynStack() "{{{
+function! SynStack()
   echo join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), " > ")
-endfunc "}}}
+endfunc
 
 nnoremap <F7> :call SynStack()<CR>
 
@@ -1293,7 +1247,7 @@
 
 set diffopt-=iwhite
 let g:diffwhitespaceon = 1
-function! ToggleDiffWhitespace() "{{{
+function! ToggleDiffWhitespace()
     if g:diffwhitespaceon
         set diffopt-=iwhite
         let g:diffwhitespaceon = 0
@@ -1302,7 +1256,7 @@
         let g:diffwhitespaceon = 1
     endif
     diffupdate
-endfunc "}}}
+endfunc
 
 nnoremap <leader>dw :call ToggleDiffWhitespace()<CR>
 
@@ -1343,30 +1297,6 @@
 nnoremap <leader>< xgEp
 
 " }}}
-" Dtach {{{
-
-function! SendToDtach(visual)
-    if a:visual
-        silent '<,'>w !dtach -s /tmp/target
-        silent !echo \| dtach -s /tmp/target
-    else
-        normal! ^vg_
-        silent '<,'>w !dtach -s /tmp/target
-        execute "normal! <esc>"
-    endif
-endfunction
-
-function! SelectToplevelForm()
-    " lol
-    silent! normal vabababababababababababababababababababababababababab
-endfunction
-
-
-nnoremap <localleader>ee :call SendToDtach(0)
-vnoremap <localleader>ee :call SendToDtach(1)
-nnoremap <localleader>eb mqggvG:call SendToDtach(1)`q
-
-" }}}
 " Nyan! {{{
 
 function! NyanMe() " {{{
@@ -1487,7 +1417,7 @@
 " }}}
 " Hg {{{
 
-function! s:HgDiff()
+function! s:HgDiff() " {{{
     diffthis
 
     let fn = expand('%:p')
@@ -1506,11 +1436,11 @@
 
     diffthis
     diffupdate
-endf
+endfunction " }}}
 command! -nargs=0 HgDiff call s:HgDiff()
 nnoremap <leader>hd :HgDiff<cr>
 
-function! s:HgBlame()
+function! s:HgBlame() " {{{
     let fn = expand('%:p')
 
     wincmd v
@@ -1528,7 +1458,7 @@
     wincmd l
     setlocal scrollbind
     syncbind
-endf
+endfunction " }}}
 command! -nargs=0 HgBlame call s:HgBlame()
 nnoremap <leader>hb :HgBlame<cr>
 
@@ -1544,8 +1474,8 @@
 " Note: If the text covered by a motion contains a newline it won't work.  Ack
 " searches line-by-line.
 
-nnoremap <silent> \a :set opfunc=<SID>AckMotion<CR>g@
-xnoremap <silent> \a :<C-U>call <SID>AckMotion(visualmode())<CR>
+nnoremap <silent> <leader>A :set opfunc=<SID>AckMotion<CR>g@
+xnoremap <silent> <leader>A :<C-U>call <SID>AckMotion(visualmode())<CR>
 
 function! s:CopyMotionForType(type)
     if a:type ==# 'v'
@@ -1583,7 +1513,7 @@
     echo 'Shell command ' . command . ' executed.'
 endfunction " }}}
 command! -complete=shellcmd -nargs=+ Shell call s:ExecuteInShell(<q-args>)
-nnoremap <leader>! :Shell 
+nnoremap <leader>! :Shell<space>
 
 " }}}
 " Indent Guides {{{
@@ -1637,6 +1567,8 @@
 " Environments (GUI/Console) ---------------------------------------------- {{{
 
 if has('gui_running')
+    " GUI Vim
+
     set guifont=Menlo\ Regular\ for\ Powerline:h12
 
     " Remove all the UI cruft
@@ -1648,8 +1580,6 @@
 
     highlight SpellBad term=underline gui=undercurl guisp=Orange
 
-    " Use a line-drawing char for pretty vertical splits.
-
     " Different cursors for different modes.
     set guicursor=n-c:block-Cursor-blinkon0
     set guicursor+=v:block-vCursor-blinkon0
@@ -1686,9 +1616,8 @@
     end
 else
     " Console Vim
-    let &t_SI = "\<Esc>]50;CursorShape=1\x7"
-    let &t_EI = "\<Esc>]50;CursorShape=0\x7"
 
+    " Use a bar-shaped cursor for insert mode, even through tmux.
     if exists('$TMUX')
         let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
         let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
@@ -1696,6 +1625,20 @@
         let &t_SI = "\<Esc>]50;CursorShape=1\x7"
         let &t_EI = "\<Esc>]50;CursorShape=0\x7"
     endif
+
+    " Save on losing focus.
+    if exists('$TMUX')
+        " let &t_ti = "\<Esc>Ptmux;\<Esc>" . &t_ti . "\e[?1004h" . "\<Esc>\\"
+        " let &t_te = "\<Esc>Ptmux;\<Esc>" . "\e[?1004l" . &t_te . "\<Esc>\\"
+
+        " noremap <ESC>[O :echom "TEST"<cr>
+    else
+        " if &term =~ "xterm.*"
+        "     let &t_ti = &t_ti . "\e[?1004h"
+        "     let &t_te = "\e[?1004l" . &t_te
+        "     noremap <ESC>[O :echom "TEST"<cr>
+        " endif
+    endif
 endif
 
 " }}}