Skip to content
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

.vimrc support #463

Open
johnfn opened this issue Jul 16, 2016 · 41 comments
Open

.vimrc support #463

johnfn opened this issue Jul 16, 2016 · 41 comments

Comments

@johnfn
Copy link
Member

johnfn commented Jul 16, 2016

  • 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 johnfn added this to the v0.3 milestone Jul 16, 2016
@rebornix
Copy link
Member

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

@johnfn
Copy link
Member Author

johnfn commented Jul 17, 2016

sick!

@jpoon
Copy link
Member

jpoon commented Nov 8, 2016

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

@johnfn
Copy link
Member Author

johnfn commented Dec 4, 2016

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 johnfn closed this as completed Dec 4, 2016
@kristiandupont
Copy link

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

@wfxr
Copy link

wfxr commented Dec 23, 2016

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?

@johnfn johnfn reopened this Dec 23, 2016
@johnfn
Copy link
Member Author

johnfn commented Dec 23, 2016

I see your argument. Reopening this issue.

@pietvanzoen
Copy link

+1 for this feature. Is there any update?

@johnfn
Copy link
Member Author

johnfn commented Mar 1, 2017

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 :)

@jpoon jpoon mentioned this issue Mar 9, 2017
@polunzh
Copy link

polunzh commented Mar 10, 2017

+1 for this feature. Is there any update?

@johnfn
Copy link
Member Author

johnfn commented Mar 10, 2017

@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

@jpoon jpoon added the size/L label Apr 22, 2017
@atedja
Copy link

atedja commented Jul 12, 2017

Just discovered Visual Studio Code, and immediately installed this plugin only to discover my .vimrc isn't being recognized 😢 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.

@Chillee
Copy link
Member

Chillee commented Jul 12, 2017

@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)!

#1897 is the PR you want to track.

@johnfn johnfn removed this from the v0.3 milestone Sep 5, 2017
J-Fields pushed a commit that referenced this issue Nov 10, 2019
Read key remapping commands from $HOME/.vimrc, $HOME/_vimrc, or a
user-specified Vim configuration file. For each, build an IKeyRemapping
object and append it to the appropriate collection, _if_ doing so will
not override a remapping specified in the VS Code settings.

Partially addresses #463. This implementation borrows heavily from
Sheepolution/vimrc-to-json.

* Add `editVimrc` command

* Add .vimrc validator, correct usage of new config names

* Source .vimrc automatically after saving it
J-Fields added a commit that referenced this issue Nov 21, 2019
For instance, `nnoremap gs workbench.action.showAllSymbols` will now work.
Refs #463
J-Fields added a commit that referenced this issue Nov 21, 2019
For instance, `nnoremap gs workbench.action.showAllSymbols` will now work.
Refs #463
J-Fields added a commit that referenced this issue Nov 21, 2019
@J-Fields
Copy link
Member

J-Fields commented Dec 9, 2019

Hey all! With the release of 1.12, I'm excited to announce that VSCodeVim now supports remappings from a .vimrc file! Special thanks go to @rdnlsmith and @Sheepolution for their great work on this.

To get started, set vim.vimrc.enable and vim.vimrc.path appropriately. You can then run the new Edit .vimrc command from the command palette.

Please note that other settings, plugins, etc. are still not supported via .vimrc. In addition, this feature shouldn't be considered 100% stable, so please test it out and submit issues with any feedback you have!

@duqcyxwd
Copy link

@J-Fields Do we have some examples of what we currently support?

@filyp
Copy link

filyp commented May 12, 2020

It looks that inoremap doesn't work, while imap and nnoremap are fine.

@berknam berknam mentioned this issue May 20, 2020
10 tasks
berknam added a commit to berknam/Vim that referenced this issue May 26, 2020
- Implement unmap and mapclear commands from vimrc with all possible values
- Update the mapping regex to include all possible values (except the
ones specific for SelectMode and TerminalMode)
- Create tests for the new implementations
(Refs VSCodeVim#463 )
@thosakwe
Copy link

thosakwe commented Jul 17, 2020

Does this support <leader> mappings? I haven't been able to get any of my bindings to work at all, whether with leader or localleader.

EDIT: It turns out that you must set the leader key in VSCode's settings, not just in your .vimrc

@berknam
Copy link
Contributor

berknam commented Jul 17, 2020

Does this support <leader> mappings? I haven't been able to get any of my bindings to work at all, whether with leader or localleader.

EDIT: It turns out that you must set the leader key in VSCode's settings, not just in your .vimrc

Currently only the remaps are read from the .vimrc. Everything else needs to be set in vscode settings.

J-Fields pushed a commit that referenced this issue Aug 16, 2020
This is a pretty massive change; see pull request #4735 for full details

Most notably:
- Support for operator-pending mode, including remaps and a half-cursor decoration
- Correct handling of ambiguous remaps with timeout
- Correct handling of recursive special case when the RHS starts with the LHS
- Correct handling of multi-key remaps in insert mode
- Failed movements that occur partway through a remap stop & discard the rest of the remap
- Implement `unmap` and `mapclear` in .vimrc

Refs #463, refs #4908
Fixes #1261, fixes #1398, fixes #1579, fixes #1821, fixes #1835
Fixes #1870, fixes #1883, fixes #2041, fixes #2234, fixes #2466
Fixes #2897, fixes #2955, fixes #2975, fixes #3082, fixes #3086
Fixes #3171, fixes #3373, fixes #3413, fixes #3742, fixes #3768
Fixes #3988, fixes #4057, fixes #4118, fixes #4236, fixes #4353
Fixes #4464, fixes #4530, fixes #4532, fixes #4563, fixes #4674
Fixes #4756, fixes #4883, fixes #4928, fixes #4991, fixes #5016
Fixes #5057, fixes #5067, fixes #5084, fixes #5125
@kyprifog
Copy link

kyprifog commented Sep 13, 2020

Just my 2 cents, but as a long time vim user often with intellij this not being figured out is my number one reason why I haven't more seriously considered switching to vscode for a while now. Don't really want to learn vscodes unique syntax for how to set up settings.json for my vimrc file.

@mieubrisse
Copy link

mieubrisse commented Feb 7, 2021

Any progress on this front? Per the comment earlier, it looks like this is the most-upvoted issue via https://github.com/VSCodeVim/Vim/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc (as posted in #463 (comment) )

EDIT: Looks like I spoke too soon and this is actually working, modulo a bug!

@laoshaw
Copy link

laoshaw commented Mar 29, 2022

jetbrains can read .vimrc just fine, hope vscode can do the same some day.

J-Fields added a commit that referenced this issue Aug 22, 2022
There remain a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Aug 22, 2022
There remain a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Aug 22, 2022
There remain a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Aug 22, 2022
There remain a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Aug 23, 2022
There remains a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Aug 23, 2022
There remains a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Aug 28, 2022
There remains a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Aug 29, 2022
There remains a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
@bhingston-va
Copy link

jetbrains can read .vimrc just fine, hope vscode can do the same some day.

I'm not sure if it's considered or untrivial, but I enjoy how jetbrains just swallows my vimrc and am not annoyed by the silent failures (basically it reads and supports what it can). It still works even after refactoring my vimrc into subfolders (few years ago) and just "plugged" from my main vimrc call plug#begin('~/dotfiles/vimide/.vim/plugged').

I'm excited to see active development on this.

J-Fields added a commit that referenced this issue Dec 28, 2022
There remains a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
J-Fields added a commit that referenced this issue Sep 7, 2024
There remains a mountain of bugs and TODOs, but this a big step toward much more substantial vimscript support.
Refs #463
Fixes #7136, fixes #7155
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests