Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update vimperatorrc for mac / phoenix / llh,e,J

  • Loading branch information...
commit e50f5bfff6eda166044ccb19db2f77c3672b2981 1 parent 7ba04b6
@alswl authored
Showing with 25 additions and 6 deletions.
  1. +18 −0 .phoenix.js
  2. +4 −6 .vimperatorrc
  3. +3 −0  .zshrc
View
18 .phoenix.js
@@ -4,6 +4,7 @@
var mash = ["alt"];
var mashShift = ["alt", "shift"];
+var CMD_BTN = ["cmd"];
var mousePositions = {};
var HIDE_INACTIVE_WINDOW_TIME = 10; // minitus
var ACTIVE_WINDOWS_TIMES = {};
@@ -229,18 +230,23 @@ api.bind('l', mash, function() {
// Previous Screen, now only support 2 display // TODO
api.bind('h', mash, function() {
+ var now = new Date();
+ //now.format('yy-M-dd h:mm:tt')
+ //api.alert('h1: '+ (new Date()).format('yy-M-dd h:mm:tt'));
var window = Window.focusedWindow();
if (!window) return;
if (window.screen() === window.screen().nextScreen()) return;
if (window.screen().nextScreen().frameIncludingDockAndMenu().x > window.screen().frameIncludingDockAndMenu().x) {
return;
}
+ //api.alert('h2: '+ (new Date()).format('yy-M-dd h:mm:tt'));
save_mouse_position_for_window(window);
var nextScreenWindows = sortByMostRecent(windowsOnOtherScreen());
if (nextScreenWindows.length > 0) {
nextScreenWindows[0].focusWindow();
restore_mouse_position_for_window(nextScreenWindows[0]);
}
+ //api.alert('h3: '+ (new Date()).format('yy-M-dd h:mm:tt'));
});
// Move Current Window to Next Screen
@@ -278,11 +284,22 @@ api.bind('delete', mash, function() {
hide_inactiveWindow(window.otherWindowsOnAllScreens());
});
+//api.bind('h', CMD_BTN, function() {
+ //var window = Window.focusedWindow();
+ //if (!window) return;
+ //window.app().hide();
+ //var window = Window.focusedWindow();
+ //api.alert(window.title()); // TODO need delay
+ //if (!window) return;
+ //restore_mouse_position_for_window(window);
+//});
+
// Window Maximize
api.bind('m', mashShift, function() {
var window = Window.focusedWindow();
if (!window) return;
window.maximize();
+ setWindowCentral(window);
//heartbeat_window(window);
});
@@ -457,3 +474,4 @@ api.bind('0', mash, function() {
//api.alert(_.chain(Window.allWindows()).value().length);
hide_inactiveWindow(Window.focusedWindow().otherWindowsOnAllScreens());
});
+
View
10 .vimperatorrc
@@ -24,11 +24,9 @@ noremap s :stop<CR>
noremap <leader>+ :open javascript:void((function(){var%20d=document,e=d.createElement(%22script%22);e.setAttribute(%22charset%22,%22UTF-8%22);e.setAttribute(%22src%22,%22http://www.duitang.com/js/core/no/collectit.js?%22+Math.floor(new%20Date/1E7));d.body.appendChild(e)})());<CR>
-noremap <leader>da :dialog addons<CR>
-" noremap <leader>p gT
-" noremap <leader>n gt
+noremap <leader>da :tabopen about:addons<CR>
noremap <leader>dp :dialog preferences<CR>
-noremap <leader>dd :dialog downloads<CR>
+noremap <leader>dd :downloads<CR>
noremap <leader>ds :dialog pagesource<CR>
noremap <leader>dc :dialog console<CR>
noremap <leader>di :dialog pageinfo<CR>
@@ -50,8 +48,8 @@ set nextpattern=\s*下一页|下一张|下一篇|下页|后页\s*,^\bnext\b,\\bn
set previouspattern=\s*上一页|上一张|上一篇|上页|前页\s*,^\bprev|previous\b,\\bprev|previous\\b,^<$,^(<<|«)$,^(<|«),(<|«)$
"surround com and net可以直接先输入网站名,再用<CTRL>+<ENTER>快捷输入.com/.net
-cnoremap<S-Return> <End>.org<Home><C-Right><Right>www.<CR>
-cnoremap<C-Return> <End>.com<Home><C-Right><Right>www.<CR>
+"cnoremap<S-Return> <End>.org<Home><C-Right><Right>www.<CR>
+cnoremap<C-Return> <C-e>.com<CR>
set 'editor=/bin/bash -lc "mvim -f \$*" mvim '
set yankencodedurl=true
View
3  .zshrc
@@ -90,6 +90,7 @@ elif [ `uname -s` = 'Linux' ] || [ `uname -o` = 'Cygwin' ]; then
alias ls="ls --color=auto"
fi
alias ll='ls -l'
+alias llh='ls -lh'
alias la='ls -a'
alias mkdir='mkdir -p'
alias ..='cd ..'
@@ -120,10 +121,12 @@ alias vdiff='vimdiff'
alias f='find . -name '
alias tarx='tar xzvf'
alias tarc='tar czvf'
+alias e='echo'
alias -g L='| less'
alias -g G='| grep --color=auto'
alias -g H='| head'
+alias -g J='| json_pp | less'
# }}}
Please sign in to comment.
Something went wrong with that request. Please try again.