-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c6b7b67
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.swp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Easy Window | ||
========== | ||
Simple and small plugin for fast navigation between windows. | ||
|
||
![Imgur](https://i.imgur.com/SOBhnQm.gif?1) | ||
|
||
Will create a new window, if it didn't exist earlier or move to an existing one. | ||
|
||
Installation | ||
------------ | ||
|
||
* Manual | ||
* Copy `plugin/ez-window.vim` to `~/.vim/plugin` | ||
* [Pathogen](https://github.com/tpope/vim-pathogen) | ||
* `git clone git://github.com/AnotherProksY/ez-window.git ~/.vim/bundle/vim-ez-window` | ||
* [Vundle](https://github.com/VundleVim/Vundle.vim) | ||
* `Plugin 'AnotherProksY/ez-window'` | ||
* [Vim-Plug](https://github.com/junegunn/vim-plug) | ||
* `Plug 'AnotherProksY/ez-window'` | ||
|
||
Shortcuts | ||
--------- | ||
|
||
<C-h> : New window or Move Left. | ||
<C-j> : New window or Move Down. | ||
<C-k> : New window or Move Up. | ||
<C-l> : New window or Move Right. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
" Simple and small plugin for fast navigation between windows. | ||
" Maintainer: AnotherProksY <[email protected]> | ||
" Repository: https://github.com/AnotherProksY/ez-window | ||
|
||
if exists('g:loaded_ezwindow') || &cp | ||
finish | ||
end | ||
let g:loaded_ezwindow = 1 | ||
|
||
|
||
function! EzWindow(key) | ||
let t:curwin = winnr() | ||
exec "wincmd ".a:key | ||
if (t:curwin == winnr()) | ||
if (match(a:key,'[jk]')) | ||
wincmd v | ||
else | ||
wincmd s | ||
endif | ||
exec "wincmd ".a:key | enew | ||
endif | ||
endfunction | ||
|
||
|
||
" Mapping | ||
nmap <silent> <C-h> :call EzWindow('h')<CR> | ||
nmap <silent> <C-j> :call EzWindow('j')<CR> | ||
nmap <silent> <C-k> :call EzWindow('k')<CR> | ||
nmap <silent> <C-l> :call EzWindow('l')<CR> |