-
Notifications
You must be signed in to change notification settings - Fork 115
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
base: master
Are you sure you want to change the base?
Conversation
…pts omap, vmap, nmap without errors
@@ -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(':') |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks, left a comment! |
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. |
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 :)