Sublime Forum

ActualVim - perfect Vim input for Sublime Text 3

#9

Sorry about that, the path needed to be to nvim.exe not just the neovim folder (I assume permission was denied on trying to execute a folder). I just added a check for this in latest master, so it will guess PATH/nvim.exe and PATH/bin/nvim.exe on windows.

As far as plugin settings, I said this in the main readme but not here - there’s a menu item and command palette option for opening the ActualVim user settings, and it will fill in the defaults if the settings didn’t exist yet.

1 Like

#10

No problem. Updated actualvim and pointed neovim_path directly to nvim.exe => It works, no error
messages any more

0 Likes

#11

Also note Windows ActualVim has an input performance problem I haven’t tracked down yet: https://github.com/lunixbochs/actualvim/issues/32#issuecomment-282717630

0 Likes

#12

Noticed that already.

Typing is rather jumpy / slow

0 Likes

#13

I improved the heuristics, and it should be a little better in latest master.

0 Likes

#14

It’s a lot better with the latest changes. Thanks for adding them!

0 Likes

#15

Hello @lunixbochs,

thanks a lot for the wonderful plugin!

Recently I decided to finally abandon Emacs and returned back to (n)vim, but your plugin makes me enthusiastic to-revive usage of my ST3 licenses and get best of both worlds. :smile:

I bet that (n)vim might have better plugins/completions, etc. for some stuff - eg. vim-go for Go language, while ST3 is strong(er) in some other fields like web technology (HTML, CSS, SASS etc.).

Caveats sections lists some currently problematic area, but I wonder, in general, is it possible/feasible to e.g. use both (n)vim/ST3 completion plugins at the same time without enabling/disabling ActualVim globally and/or locally?

0 Likes

#16

This is already implemented. I expose the Sublime completions to vim as a completefunc, so you can hit ^X^U to get Sublime completions while Vim is enabled. I’m also going to hopefully remove the insert-mode input interception so Sublime can still show automatic completion/snippet popups, at which point I’ll query Vim for completion data too to make this work both ways.

The caveat is just that sublime won’t auto-suggest completions as you type, not that they don’t work.

Multiple selection should work extremely well when it’s done, but will take a bit of work to get going (I basically need to track selection 100% on Sublime side, and dispatch a different key to vim per selection, kinda… or wait for official neovim support for it).

The “undo” thing isn’t a huge issue right now (you should mostly just use vim undo), and the insert hack idea that will fix suggestion popups should fix undo too.

0 Likes

#17

OK, I’ve to test it further…

That will be cool as well. :+1:

What about ST3’s status bar to show me when I issuing normal mode’s stuff, e.g. to enter current date via
:!r date

?

One of the thing which I regularly use in vim and won’t give it up so easily is reformat-paragraph feature:
visual-mode j (for selection) gq
so, why e.g. the above snippet cannot produce result immediately, but I’ve to ‘leave’ (n)vim-mode by e.g. pressing Esc or something, iow. is it just a feature required to make the whole bridge working?

0 Likes

#18

I’ve asked for the ability to anchor a phantom to the bottom of a view in Sublime. I don’t have any good ways to display that information yet (but :command line and search should show up in status bar right now)

so, why e.g. the above snippet cannot produce result immediately, but I’ve to ‘leave’ (n)vim-mode by e.g. pressing Esc or something, iow. is it just a feature required to make the whole bridge working?

This should be fixed in Neovim 0.2, which was recently released.

0 Likes

#19

Hmm…trying with
:r !date
example, I do not see anything?

[quote]This should be fixed in Neovim 0.2, which was recently released.
[/quote]

Great…I’m waiting to be released for my Fedora (f25) distro…

0 Likes

#20

I can’t really guarantee anything before neovim 0.2, but I definitely see the status/search/command line on mine.

0 Likes

#21

Hmmm…which OS do you use?

0 Likes

#22

I’m on OS X.

0 Likes

#23

It would be nice if some Linux user can confirm whether there is an issue here? (I have access to neither Mac nor Win OS-es…)

0 Likes

#24

You can debug the screen scraper (yes, that’s how I get the status line right now) with the Sublime console:

import ActualVim; print(ActualVim.neo.vim.screen)

import ActualVim; print(ActualVim.neo.vim.status_line)

Neovim is rather easy to build yourself as well, and you can set neovim_path in your ActualVim settings if you want to test a local build.

If status_line has the typed command but it’s not in the Sublime status bar, I know where the issue probably lies and have an easy fix if so.

0 Likes

#25

After issuing the:

:r !date

command, I get the following:

`import ActualVim; print(ActualVim.neo.vim.screen)

:r /date
`

and

import ActualVim; print(ActualVim.neo.vim.status_line)

which shows the blank state of cursor.

[quote]Neovim is rather easy to build yourself as well, and you can set neovim_path in your ActualVim settings if you want to test a local build.
[/quote]

Do you believe that 0.20 should behave better in this regard? In that case I’m going to try to build from the source…

Edit: I built nvim from the source (0.2.1-x), but the issue is still present.

In my case status_line is blank?

0 Likes

#26

Printing ActualVim.neo.vim.screen should print a lot more than the command line. Have you customized your vim status line in init.vim? I don’t really have a way of supporting that yet. I’m waiting on neovim external command line support.

If you’ve customized, you can check the g:actualvim variable from vim config to disable plugins inside ActualVim.

0 Likes

#27

Ahh, my mistake…I forgot that my init.vim is symlinked to the vim’s one. It works now… :cry:

When does neovim plan to support that?

0 Likes

#28

A decent substitute for now would be the ability to pin variable-height minihtml across the bottom of a view like the vim status bar, but I don’t know how to convince Sublime to add that, so I’m waiting on both sides for now :slight_smile:

I PoC’d a major hack that’s actually pretty good until you scroll or want to read the text at the bottom:

But I’m holding out for something more like this (at which point I’d personally just hide the Sublime status bar entirely)

0 Likes