-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable vim mode? #49
Comments
This feature is in a more experimental state and will likely need some discussion and follow-up work to get it where it needs to be. Currently, you should only need It should render a mode box on the bottom right corner of the screen. Now in say, a browser-based text box like the reply form, you can operate in normal/insert modes as indicated by the status box. For now, we mostly focused on moving by words, beginning of the line, end of the line, moving up with k, down with j, left with h, and right with l. This is where more feedback can really help us so we know how much to implement. Could you please provide some feedback on #50 so I know what to prioritize and how we can make this feature more helpful to you? I've attached a screenshot to see the mode indicator. |
hmm I've been unable to see that mode box rendered in any browser. |
the 'toggle console' also doesn't seem to work for me- trying ctrl/cmd + ` (trying to look to it to implement a 'toggle app' :)-
|
@dxuehu Can you please create a separate issue for toggling the console? The VIM mode status should be displayed on the bottom right corner of your main screen. Can you open the Hammerspoon console, reload the config, and paste any output as well as your ~/.spacehammer/config.fnl? It sounds like the app is not loading properly. |
https://github.com/dxuehu/dotfileserino/blob/master/spacehammer/config.fnl |
https://github.com/dxuehu/dotfileserino/blob/master/spacehammer/config.fnl#L508 This may be something to improve with documentation but that config object at the bottom of the file is what is exported and read as "config". The issue with https://github.com/dxuehu/dotfileserino/blob/master/spacehammer/config.fnl#L80 is that it's not exported and is just being evaluated then immediately garbage-collected. Instead please update the config definition at https://github.com/dxuehu/dotfileserino/blob/master/spacehammer/config.fnl#L497-L502: (local config
{:title "Main Menu"
:items menu-items
:keys common-keys
:apps apps
:hyper {:key :F18}}) To: (local config
{:title "Main Menu"
:items menu-items
:keys common-keys
:apps apps
:vim {:enabled true}
:hyper {:key :F18}}) That should enable vim mode and display the mode indicator. |
oh doh, makes sense. thank you! |
How might I toggle vim on and off from the menu? |
@brandonxoliver Try the following: Ensure vim mode is enabled, keep this towards the bottom of your config.fnl: (local config
{
;; ...
:vim {:enabled true}}) Create a vim-items collection of menu items: (local vim-items
[return
{:key :e
:title "Enable vim mode"
:action "vim:enable"}
{:key :d
:title "Disable vim mode"
:action "vim:disable"}]) Update the main menu items to create a vim submenu: (local menu-items
[ ;; ...
;; ...
{:key :v
:title "Vim"
:items vim-items}]) Save your config.fnl and you should see a vim group in the main menu. |
Awesome thanks! |
how does this work?
I've tried
{:vim {:enabled true}}
(vim.enable)
in config.fnl.
Thanks!
The text was updated successfully, but these errors were encountered: