-
Notifications
You must be signed in to change notification settings - Fork 9
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
Error decoding data from vim command #2
Comments
@terrycojones Is it possible to dynamically detect output characters that move the cursor and assume from there? |
Hi @rybot666 I'm not sure what you mean exactly. Do you mean that if an escape sequence is detected in the output then not keep the output from the command at all? The trouble is that sometimes you probably want the output stripped of the escape sequences (as in the case of e.g., |
@terrycojones I mean only detect specific escape sequences (cursor moving) as only interactive programs use them. You could also have a syntax to "ignore this command" in pipes |
Something I noted. If I enter vim from daudin then copy code for external use with ctrl c I crash with: Vim: Caught deadly signal TERM Any chance that ctrl-c can be ignored while in another application? |
@john9631 No terminal does this - control C is a well known keyboard code for "end this program". VIM has its own keybinds to copy, as does Emacs |
Ctrl C is non uncommonly mapped to copy for the external environment. https://vim.fandom.com/wiki/Quick_yank_and_paste If you haven't tried it @rybot666 I highly recommend you try ptpython, an enhanced python shell that integrates vim in both ptpython and ptipython modes. |
Hi @john9631 - thanks for commenting. Yes, this should be straightforward, and I guess there's no reason not to just catch & ignore Ctrl-C in general. Are you actually using daudin day-to-day? Sorry for being a bit slow. I accidentally "updated" the firmware on my main laptop and now it only boots into Windows, not Linux. Will hopefully have that sorted soon... and then can get back to doing more useful things! |
Thanks @terrycojones, yes I have been using it most days although I did alias it to psh. |
Great! :-) I have just pushed a new version |
The new version is now ignoring |
@rybot666 The latest code detects a |
Hmm, I spoke too soon! I'm going to have to look into this a bit more. The |
OK, just pushed version |
Working fine here. Exactly as expected. I see what you mean about psh being gone too - namespace pollution - so I've changed my mapping to dsh for daudin adding to sh, dash, bash and zsh currently on the machine to my knowledge. |
I ran
vim
indaudin
to see how it would go. All went well until I exited.I have a feeling we should just silently (unless debugging is on) swallow such errors. It would be good to know why this one happens and fix it, but OTOH we probably don't want all the data that vim writes to the terminal to be stored in the
_
pipeline variable. But how to distinguish with cases we do want, e.g., when runningls
?The text was updated successfully, but these errors were encountered: