diff --git a/.nvimrc b/.nvimrc index c56361d..6eb23cb 100644 --- a/.nvimrc +++ b/.nvimrc @@ -46,6 +46,8 @@ set incsearch set clipboard+=unnamed set noswapfile set t_Co=256 +set hidden +set relativenumber "Nertree Toggle map :NERDTreeToggle @@ -54,7 +56,11 @@ let NERDTreeShowHidden=1 " enable all Python syntax highlighting features let python_highlight_all = 1 -"Ctrl + Left and Right switch buffers +"Option + Left and Right switch buffers +"execute "set =\e\eC" +"execute "set =\e\eD" nnoremap :bnext nnoremap :bprevious nnoremap :bd +":h i_CTRL-V + diff --git a/.phoenix.js b/.phoenix.js index edde77d..add97d1 100644 --- a/.phoenix.js +++ b/.phoenix.js @@ -10,7 +10,7 @@ var increment = 0.05; /* Position */ var Position = { - + central: function(frame, window) { return { @@ -141,6 +141,30 @@ Window.prototype.grid = function(x, y, reverse) { this.setFrame(_(newWindowFrame).extend(position)); } +Window.prototype.snapSize = function(axis) { +Phoenix.log(axis); +var modalmessage = new Modal(); +modalmessage.message = 'test'; +modal.duration = 2; +modal.show(); + var frame = this.screen().visibleFrameInRectangle(); + + if (axis === 'x') { + var newWindowFrame = _(this.frame()).extend({ + width: (frame.width) + }); + } else { + var newWindowFrame = _(this.frame()).extend({ + height: (frame.height) + }); + } + + var position = reverse ? Position.topRight(frame, newWindowFrame, margin) : + Position.topLeft(frame, newWindowFrame, margin); + + this.setFrame(_(newWindowFrame).extend(position)); +} + Window.prototype.reverseGrid = function(x, y) { this.grid(x, y, true); @@ -283,6 +307,16 @@ keys.push(Phoenix.bind('.', controlAltShift, function() { Window.focusedWindow() && Window.focusedWindow().decreaseHeight(); })); +// make full width but same height +keys.push(Phoenix.bind('z', controlCommandShift, function() { +var modalmessage = new Modal(); +modalmessage.message = 'test'; +modal.duration = 2; +modal.show(); + + Window.focusedWindow() && Window.focusedWindow().snapSize('x'); +})); + function focusApp(name) { Phoenix.log('About to focus ' + name); App.runningApps().forEach(function(app) { diff --git a/.profile b/.profile index da17ca7..c8151bb 100644 --- a/.profile +++ b/.profile @@ -5,7 +5,7 @@ NC='\033[0m' blackText='\e[1;30m' whitebg='\e[47m' -echo -e "${hashes}███████████████████████████████████████████████████████████████████████████████████████████████████████████████████${NC}" +#echo -e "${hashes}███████████████████████████████████████████████████████████████████████████████████████████████████████████████████${NC}" # run NVIM instead of VIM alias vim='nvim'