GithubHelp home page GithubHelp logo

felixkratz / sketchyvim Goto Github PK

View Code? Open in Web Editor NEW
613.0 613.0 9.0 8.37 MB

Adds all vim moves and modes to macOS text fields

License: GNU General Public License v3.0

C 98.25% C++ 0.96% Makefile 0.22% Objective-C 0.55% Prolog 0.02%
accessibility input keyboard-shortcuts macos text vim

sketchyvim's People

Contributors

felixkratz 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

sketchyvim's Issues

Feature request: vi mode indication

At first, thanks for great project, FelixKratz!

I'm thinking about how to make mode visible, and here is some ways to show it:

  • highlight the texture border with different colors like normal -> blue, insert -> green, etc
  • add mode to statusbar
  • use popup which appears near the cursor when switching keyboard layout

Personally, I have no idea how to implement it.
Maybe you can think about it in next releases?

Debugging

I am able to build and deploy, however, do you have any tips for debugging or viewing logs etc?

Notes app reformats whole document

Going into Normal mode and deleting a character in the body turns the whole Note into Title, i.e boldface and bigger font.
Screen Shot 2022-09-21 at 12 56 43 PM

Deleted a character in the highlighted line

JK for escape

This is not really an issue, but I was wondering if it would be possible to use jk for escape?

similar tools

You can check out Vimac and kindaVim.
Vimac does something slightly different, but you could take a look at its scrolling feature.
KindaVim is closed source, but you can check out how it works, and as an idea for how to implement certain features.

FR: Support for `gj` and `gk`

Since most of the text fields where svim will be used have line wrapping, having gj and gk would be very useful for mappings like

nnoremap j gj
nnoremap k gk

right now, j and k move logical lines, which makes them a bit hard to predict in text fields where you are not sure where exactly the previous line is (i.e. is the line above wrapped or a "true" previous line?)

The workaround might be as simple as mapping gj and gk to arrow-down and arrow-up, since the arrow keys in macOS use visual instead of logical lines?

app doesn't work

It may sound stupid, but I couldn't figure out how to make it work. Esc button seem to not work in textfields

Disable for certain apps

Is there any way to set a list of apps to disable this for?

It makes VIM mode on VS code, for example, unusable.

Thanks!

Notion Integration

I want to have Vim keybindings in notion, but SketchyVim does not seem to be able to edit text fields in Notion. Is there any workaround to this or something I can use?

zsh: trace trap svim

I cannot add svim to launchctl due to some work politics. What I am doing instead is to have a separate Tmux tab with panes for yabai, skhd and now svim too. The first two work flawlessly but the svim seems to crash occasionally. Last time it was 1h20

image

How can I debug this? Maybe I will find the root cause

Duplicate symbols linkage error

I tried to wrap svim package with Nix. I could build svim locally, but Nix uses macOS sdk 11.0 and failed.

duplicate symbol '_g_ax' in:
    /private/tmp/nix-build-sketchyvim-1.0.11.drv-0/main-8aae59.o
    bin/workspace.om
duplicate symbol '_g_event_tap' in:
    /private/tmp/nix-build-sketchyvim-1.0.11.drv-0/main-8aae59.o
    bin/workspace.om
duplicate symbol '_g_front_app_ignored' in:
    /private/tmp/nix-build-sketchyvim-1.0.11.drv-0/main-8aae59.o
    bin/workspace.om
duplicate symbol '_g_ax' in:
    /private/tmp/nix-build-sketchyvim-1.0.11.drv-0/main-8aae59.o
    bin/event_tap.o
duplicate symbol '_g_event_tap' in:
    /private/tmp/nix-build-sketchyvim-1.0.11.drv-0/main-8aae59.o
    bin/event_tap.o
duplicate symbol '_g_ax' in:
    /private/tmp/nix-build-sketchyvim-1.0.11.drv-0/main-8aae59.o
    bin/ax.o
ld: 6 duplicate symbols for architecture arm64

svim ignores configs after restart, and is unstartable after reinstall

Hi, sorry to bother you once more 🙈

So the after everything with Alfred worked fine after updating to 1.0.9, I made changes to the svimrc and restarted svim to load those changes (brew services restart svim).

From then on, svim did not recognize any configs anymore – neither in the blacklist file, nor in the svimrc. (and I made sure I did not include any comments, like in #18). Restarting didn't help, but I did notice an svim still being listed as active process, so I killed that process, too, but that also didn't change anything.

So then I decided to reinstall svim and restarted my machine, but weirdly after that, svim refuses to launch at all. running as a foreground service (svim) only results gives this error message: Error: Could not create lock-file..

abbreviations expands on insert mode exit

Hi,
Thanks for the great project. I am not online very often and so I don't read much of other peoples comments and issues unfortunatly. mainly I read the manuals.
so I decided to use the abbreviations in svim since snippets are a little more involved.

iabbrev @@ some@some.com

and it only expands when i exit insert mode . normal it expands after I press the space bar. it is a built in feature of Vim/Neovim
it would be a great to have it working.
thanks

Issues in iTerm

Thanks for your beautiful work on this utility. I love it.

I have faced an issue where ctrl+c doesn't work in iTerm. It worked again after I stopped svim.

Not working in slack

Slack doesn't seem to be working with SketchyVim. Perhaps it's related to it being an Electron app?

Blacklisting Alfred does not work

Inside the Alfred prompt, I don't really need vim, and I want to quit the prompt with esc. However, with svim, it takes 2-3 times escape before it quits.

Annoyingly, adding any of these to the blacklist does not work (and I confirmed that the blacklist does work with other apps)

"Alfred 5"
Alfred 5
Alfred
com.runningwithcrayons.Alfred

I also tried both, the Standard Mode and the Compatibility Mode of Alfred, blacklisting Alfred does not work in any of those
Pasted image 2022-09-07 22 47 30

SketchyVim seems to be spawning zombie processes

Hi @FelixKratz,

Just thought I would see if this was a known issue, I seem to see SketchyVim spawning a bunch of zombie processes.
Thought I would raise this as an issue,

I have attached some ps output to show that the zombie processes are children of the svim process, let me know if you would like any further debug steps to be taken.

λ [~] ps axl | grep Z | grep defunct
  501   964   955   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7046  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7082  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7094  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7097  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7104  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7105  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7161  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7162  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7169  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7175  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7178  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7180  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7188  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7190  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7196  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7197  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  7254  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
  501  8399  6416   0   0  0        0      0 -      Z      ??    0:00.00 <defunct>
λ [~] ps -p 6416                    
  PID TTY           TIME CMD
 6416 ??         0:00.17 /opt/homebrew/opt/svim/bin/svim

Further info about the device if relevant:

I am on an M2 Macbook Air, on MacOS 14.0

Side note, love the project and as always, appreciate your hard work 👍🏼

Any nonbrew installation?

I've really come to dislike brew due to forced OS updates. To each their own, but I don't think I'm alone in having this opinion. Would you consider providing no brew installation instructions as well?

Unable to run start command

m1 macbook
when run "brew services start svim"
:

brew services start svim
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/xxx/Library/LaunchAgents/homebrew.mxcl.svim.plist` exited with 5.

and run "sodu brew serbices start svim"
:

sudo brew services start svim
Password:
Warning: Taking root:admin ownership of some svim paths:
  /opt/homebrew/Cellar/svim/1.0.11/bin
  /opt/homebrew/Cellar/svim/1.0.11/bin/svim
  /opt/homebrew/opt/svim
  /opt/homebrew/opt/svim/bin
  /opt/homebrew/var/homebrew/linked/svim
This will require manual removal of these paths using `sudo rm` on
brew upgrade/reinstall/uninstall.
Warning: svim must be run as non-root to start at user login!
Bootstrap failed: 5: Input/output error
Error: Failure while executing; `/bin/launchctl bootstrap system /Library/LaunchDaemons/ho
![1](https://github.com/FelixKratz/SketchyVim/assets/30278786/d6da2615-8dab-4493-9025-4843262fa9a7)
mebrew.mxcl.svim.plist` exited with 5.

Issues with Messages App

Hey, I'm having some problems with svim and the native messages app. It works occasionally, but when I move between conversations I can't get back into normal mode. Sometimes quitting and relaunching messages and/or restarting the svim service gets it back for a minute, but it doesn't last long.

Is this a known limitation or is this somehow fixable? I couldn't find any other issue/discussion on the topic.

【some thoughts】black-list & white-list & Application Bundle ID

【some thoughts】black-list & white-list & Application Bundle ID

black-list & white-list

Something like this:

set blacklist=0
set whitelist=1

Terminal

using App Bundle ID instead of App Name

Because it doesn't have spaces between characters and most important: unique

There are serial ways to get an app's Bundle ID:

mdls /Applications/MacVim.app | grep kMDItemCF
osascript -e 'id of app "Neovide"'

http://www.mothersruin.com/software/Apparency/

Issue with SketchyVim in Arc Browser and Request for Default Normal Mode

Hi @FelixKratz,

First off, I wanted to express my enthusiasm for SketchyVim—it's a fantastic project, and I've found it to work seamlessly in most cases.

However, I've been facing an issue when trying to use SketchyVim in the relatively new Arc browser. Unfortunately, it doesn't seem to cooperate as expected. Have you come across this before, or is there something specific I should configure to make it work in Arc?

Additionally, I was wondering if there's a way to set SketchyVim to default to normal mode rather than input mode. I find myself often starting in input mode unintentionally, and it would be great to have the option to set the default mode.

Thanks a lot for your work on this project, and I appreciate any guidance or assistance you can provide!

Best regards,
Abel

SketchyVim config setup

Hello! Newbie VIM user here.

Thank you for this wonderful project. I am in the process of setting it up and learning how to use it, and was wondering how the svimrc file is meant to be set. For context, I manually created a folder in ~/.config/ named "svim".

  1. Do I just create a ".svimrc" file or should it be a plain "svimrc.txt" file?
    1b. Same as above but for the blacklist configuration.
  2. Do I place the .svimrc file in ~/.config/svim/ or should it go in some other directory?

Furthermore, I have tried both file formats for svimrc and blacklist, but neither seems to work.

The svimrc for reference:

nmap H 0
nmap L $
nmap :nohl
set clipboard=unnamed

The blacklist for reference:

iTerm2
Terminal
Obsidian
WebStorm
IntelliJ IDEA

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.