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

Fixing .vintageousrc not parsing omap, vmap; adding nmap #956

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cchrisman
Copy link

Hi Guillermo, I'm working on getting vintageous working with my rather esoteric vim preferences, and I run across some problems reading the .vintageousrc file. My PR change is pretty straightforward, it fixes some simple calling errors, and allows without a leading colon (to be consistent with actual .vimrc syntax).

I also might take a stab at implementing non-recursive (noremap) mappings; I'm currently kind of working around that limitation. I know the docs say that it doesn't support recursive mapping, but it looks the behavior is that most of the time it won't follow recursive maps, and thus behave very much like noremap, but some cases, like matching partials, it will. If you have any suggestions or advice on this, let me know, I'm willing to put in some programming time because vintageous is pretty great :)

@@ -31,20 +31,20 @@ def run(self):
def parse(self, line):
try:
_logger().info('[DotFile] parsing line: {0}'.format(line))
if line.startswith((':map ')):
line = line[1:]
line = line.lstrip(':')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: does Vim allow spaces before : in config files? If so, we'd need to account for it here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empirically vim seems to ignore trailing and leading whitespace in .vimrc lines, so the code could probably be simplified with a line = line.trim() first thing, then you can remove the rstrip.

@guillermooo
Copy link
Owner

Thanks, left a comment!

@guillermooo
Copy link
Owner

I also might take a stab at implementing non-recursive (noremap) mappings; I'm currently kind of working around that limitation. I know the docs say that it doesn't support recursive mapping, but it looks the behavior is that most of the time it won't follow recursive maps, and thus behave very much like noremap, but some cases, like matching partials, it will. If you have any suggestions or advice on this, let me know, I'm willing to put in some programming time because vintageous is pretty great :)

Thanks!

The mapping stuff was done pretty quickly to get the basics working. I'd need to do some research to see what Vim does in this area. Handling key sequences internally is one of the trickier parts of Vintageous and there are known bugs (to me, at least!). If you need guidance, just ask; I'll try to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants