Vim icon indicating copy to clipboard operation
Vim copied to clipboard

.vimrc support

Open johnfn opened this issue 8 years ago • 41 comments

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Support an actual .vimrc file alongside our current settings.json.

Allow users to specify a location for the .vimrc insite the settings.json file.

Support basic .vimrc commands.

johnfn avatar Jul 16 '16 21:07 johnfn

Yup, assign this to me as I'm working on a prototype.

rebornix avatar Jul 17 '16 03:07 rebornix

sick!

johnfn avatar Jul 17 '16 03:07 johnfn

Re-opening this -- we don't have .vimrc support.

jpoon avatar Nov 08 '16 05:11 jpoon

I'm gonna close this as although it's true that we don't support .vimrc, I believe our settings.json support is a solid equivalent, except better because it has autocomplete and documentation popups.

If anyone disagrees, feel free to open a conversation on this issue.

johnfn avatar Dec 04 '16 03:12 johnfn

Well, I have a shared vimrc file for vim and vsvim. I would have loved to include that from here as well.

kristiandupont avatar Dec 15 '16 10:12 kristiandupont

I also expect vimrc support feature. Almost everyone using vscodevim knows how to config vimrc. So documentation popups feature is not that important as far as I see.

I agree setting.json is good, but I think reuse and DRY means much. We can use vimrc in vsvim, ideavim, neovim, etc, but we cant't use vscode setting.json anywhere else. That's the problem.

Maybe support both setting.json and vimrc is a better way?

wfxr avatar Dec 23 '16 07:12 wfxr

I see your argument. Reopening this issue.

johnfn avatar Dec 23 '16 07:12 johnfn

+1 for this feature. Is there any update?

pietvanzoen avatar Mar 01 '17 13:03 pietvanzoen

It's certainly on my radar, however it is currently deprioritized because:

  • There are a lot of other issues with more thumbs up that we need to get to first.
  • No functionality is actually lacking. It's just annoying not to have.

If a bunch of people thumbs up the original issue, I'll certainly reconsider :)

johnfn avatar Mar 01 '17 14:03 johnfn

+1 for this feature. Is there any update?

polunzh avatar Mar 10 '17 07:03 polunzh

@polunzh The update is the post I made 9 days ago right above you. :P

If you're curious, we pretty much tackle issues in this order: https://github.com/VSCodeVim/Vim/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

johnfn avatar Mar 10 '17 07:03 johnfn

Just discovered Visual Studio Code, and immediately installed this plugin only to discover my .vimrc isn't being recognized :cry: I can't use vim mode without my vimrc, too many keybindings that I have developed over the years and too lazy to port them over to this plugin.

atedja avatar Jul 12 '17 18:07 atedja

@atedja Luckily, very good progress is being made on that front. Through neovim integration, we'll be able to support your entire .vimrc (including plugins)!

https://github.com/VSCodeVim/Vim/pull/1897 is the PR you want to track.

Chillee avatar Jul 12 '17 19:07 Chillee

@johnfn any status updates on this issue? I think it's currently the third highest prioritised task. Thanks!

For a temporary quick-hack, does anyone have a tool for converting keybindings from a .vimrc (or an .init.vim) into settings.json?

mvalkon avatar May 31 '18 09:05 mvalkon

Looks like this is now the #1 requested issue, hopefully we can see this supported soon? This is the only thing preventing me from using VSCode.

nickbrooking avatar Aug 01 '18 14:08 nickbrooking

I also would really like the ability to switch between vscode and vim when needed. This is a must for me!

canyon289 avatar Sep 15 '18 03:09 canyon289

not having to manually re-create my entire 375 line .vimrc in a json file would be ideal... either a one-time converter or first-party support would be awesome

skylarmb avatar Oct 11 '18 16:10 skylarmb

I would be super keen to have this. It's not practical to duplicate key bindings in both vscode's settings and .vimrc.

bluprince13 avatar Oct 20 '18 17:10 bluprince13

@rebornix any updates on this issue?

vinceau avatar Nov 06 '18 04:11 vinceau

Unlike our other highly upvoted issues which are difficult due to VSCode API limitations, this one is completely doable. Even without much experience in the codebase, someone could take a whack at this, since all you have to do is basically regex match a bunch of lines of a file. And getting even small sections of vimrc parsing up and running would probably be useful to lots of folks.

johnfn avatar Nov 27 '18 20:11 johnfn

Working on a third-party script to port .vimrc to settings.json right now. I'll update this with a link to the repo soon.

devanshuDesai avatar Jan 02 '19 09:01 devanshuDesai

Any update on this issue? I'd love to share my .vimrc with all of the IDEs on my machine , especially as I've a huge customize configurations/mappings

abduwaly avatar Jan 10 '19 05:01 abduwaly

I wrote a simple parser for this in Python.

Download

Example

.vim

nmap nt gg
nnoremap + <C-a>
vnoremap Y :w<CR>

settings.json

{
	"vim.normalModeKeyBindings": [
		{
			"before": ["n", "t"],
			"after": ["g", "g"]
		}
	],
	"vim.normalModeKeyBindingsNonRecursive": [
		{
			"before": ["+"],
			"after": ["<C-a>"]
		}
	],
	"vim.visualModeKeyBindingsNonRecursive": [
		{
			"before": ["Y"],
			"commands": [":w"]
		}
	]
}

Sheepolution avatar Feb 08 '19 18:02 Sheepolution

Is there any word on the progress of this? I think it's a highly desirable feature and it's looks like that's been the case for 3+ years.

drewboardman avatar Feb 23 '19 22:02 drewboardman

+1 To this feature, I was just able to import my .vimrc into Visual Studio 2015's Vim plugin, and now I'm surprised VSCodeVim doesn't support this.

john-dulaney avatar Feb 25 '19 16:02 john-dulaney

Why is this not a thing yet? As an avid vim user I am trying to pickup VSCode fulltime for development, and keep my vim for my DevOps work. While the vim bindings offer a familiar interface I cannot leverage any of the real benefits of my .vimrc which I spent over 10 years developing...

nykc avatar Apr 05 '19 14:04 nykc

In the meantime this is an excellent solution: https://github.com/neoclide/coc.nvim

skylarmb avatar Apr 05 '19 16:04 skylarmb

I think what we need right now is not implementing the .vimrc support in vscodevim right out of the box.

Instead, we should build a .vimrc to vscode-compatible json coverter to leverage the current vscode capability.

drNoob13 avatar Apr 20 '19 08:04 drNoob13

I have created a JSON converter to address this issue. Feel free to check out and contribute to this repository: vsc2vim

devanshuDesai avatar Jul 22 '19 02:07 devanshuDesai

I have expect this feature for a very long time.

liulangrenaaa avatar Aug 25 '19 18:08 liulangrenaaa