Git Product home page Git Product logo

winresizer's People

Contributors

benknoble avatar biobox avatar esneider avatar jimsei avatar johnmathews avatar simeji avatar yilin-yang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

winresizer's Issues

Mismatch Message

The message does not change even if I change the settings.

g:winresizer_keycode_finish = 32 (Space)

echo '[window resize mode]... "Enter": OK , "q": Cancel'

It has been hard coding.

 echo '[window resize mode]... "Enter": OK , "q": Cancel'

โ—ฏ [window resize mode]... "Space": OK , "q": Cancel
โ˜“ [window resize mode]... "Enter": OK , "q": Cancel

Resize window edge determination looks strange with `winfixwidth` and `winfixheight`

For example below,
the window * is considered not right edge,
and it works as if the window's right partition can be movable
(i.e left key (j) decreases window width / right key (l) increases).

This looks quite strange.

+-----+-----+-----+
|     |     |     |
|     |  *  | wfw |
|     |     |     |
+-----+-----+-----+
      ^
      This moves

I tried to fix it like below, however, it is still incomplete.

--- a/autoload/winresizer.vim
+++ b/autoload/winresizer.vim
@@ -13,12 +13,12 @@ fun! winresizer#getEdgeInfo()
   let chk_direct = ['left', 'down', 'up', 'right']
   let result = {}
   for direct in chk_direct
-    exe 'let result["' . direct . '"] = ' . !winresizer#canMoveCursorFromCurrentWindow(direct)
+    exe 'let result["' . direct . '"] = ' . !winresizer#canMoveCursorToResizableWindowFromCurrentWindow(direct)
   endfor
   return result
 endfun
 
-fun! winresizer#canMoveCursorFromCurrentWindow(direct)
+fun! winresizer#canMoveCursorToResizableWindowFromCurrentWindow(direct)
   let map_direct = {'left':'h', 'down':'j', 'up':'k', 'right':'l'}
   if has_key(map_direct, a:direct)
     let direct = map_direct[a:direct]
@@ -28,8 +28,9 @@ fun! winresizer#canMoveCursorFromCurrentWindow(direct)
   let from = winnr()
   exe "wincmd " . direct
   let to = winnr()
+  let fixed = (a:direct ==# 'up' || a:direct ==# 'down') ? &winfixheight : &winfixwidth
   exe from . "wincmd w"
-  return from != to
+  return from != to && !fixed
 endfun
 
 fun! winresizer#swapTo(direct)

With the window arrangement like below,
the right partition of the window * moves.

+-----+-----+-----+
|     |     |     |
|     |     | wfw |
|     |     |     |
|     |     +-----+
|     |     |     |
|     |  *  | wfw |
|     |     |     |
|     |     +-----+
|     |     |     |
|     |     | wfw |
|     |     |     |
+-----+-----+-----+
            ^
            This moves

Keycodes for size not working with Cursors

I tried all of those

let g:winresizer_keycode_up = '<C-UP>'
let g:winresizer_keycode_up = '<C-up>'
let g:winresizer_keycode_up = '<Up>'
let g:winresizer_keycode_up = '<UP>'
let g:winresizer_keycode_up = '<up>'

And similar, but nothing worked.

Expecting: I expected to be able to use regular cursors for window size movement

thanks for this

this is the nicest split management tool i've come across.

This plugin cannot work at NeoVim nightly now

Description

After pressing the start key, some ghost keys(i.e. I didn't type those keys but they got detected) will appear and this causes all resizing/moving/focusing not usable: if I press l it receives something like lhlakjklh<CR>.

Info

neovim version

nvim --version
NVIM v0.9.0-dev-567+ga731a40f7
Build type: Release
LuaJIT 2.1.0-beta3

[Feature Request] Window close hotkey

Could you add window close hotkey?

If some hotkey, such as [C] is added,
in walking around on windows in window focus mode,
you can quickly close windows without leaving the plugin.

<enter> is not working as expect

  1. start with resizer mode
  2. switch to focus mode
  3. move around
  4. press enter
  5. supposed to leave the focus mode, but actually go back to the resizer mode
  6. no problem with esc

Entering move mode with one command

Hi,

i cant enter move mode and move a window with one macro like this:
noremap <silent> <A-h> <A-r>mh<CR>

I aim for an i3-like behaviour, but the above just does nothing.
Is there a way to make this mapping available in the config?

How does move mode work?

Thank you for this plugin!
I tried using hjkl but it doesn't seem to permute the windows after I enter move mode, instead it just switches the context

Create new splits when moving windows towards an edge, like standard vim

Check out this short video: I've got three horizontal splits, all on top of each other and I use the standard vim window commands (CTRL-W + H,J,K,L) to move one of them around.

ezgif-4-055b8fcd6194

When I try to move any of the windows to the right or left, it creates a new vertical split that is completely filled by the window I moved.
And when I try to move the vertically split window downwards or upwards, it deletes the vertical split and becomes a horizontal split again.

Basically, standard vim behaviour is: Trying to move a window towards the "edge" of the entire vim window changes the type of split it is. While the standard window movement commands can be pretty unintutive, this is a feature I quite like.

Any chance you could replicate it in the window move mode of this plugin?

Missing a :help page

This plugin would really benefit from a :help page suitable for viewing as documentation in Vim itself.

What brought this to my attention: the new move/focus features showed up after I updated my version of the plugin, and I figured them out via experimentation but wanted to read more about them. I was unable to find documentation within Vim or the plugin other than the README.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.