Subscribe: Comments for Paul Goscicki
Added By: Feedage Forager Feedage Grade B rated
Language: English
comment mode  comment  function  indicator zsh  indicator  mode indicator  mode  prompt  return  vim  zle  zsh prompt  zsh 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Comments for Paul Goscicki

Comments for Paweł Gościcki

Random pieces of code, thoughts and movie reviews

Last Build Date: Wed, 28 May 2014 15:43:59 +0000


Comment on Tic-tac shock by Cesco

Wed, 28 May 2014 15:43:59 +0000

In the beginning all tic-tac had a dark core, as kids we used to let the sugary white melt on the tongue and then chew on the dark core. The mint flavor would hit you like a freight train. The other flavors were introduced much later, including the whimpy all-white tic-tac. Peace.

Comment on Tic-tac shock by Rictorian

Tue, 06 May 2014 22:26:59 +0000

Whoa... But what about the other flavours? I'll have to check that. But, I do wonder about the chemical formula. That might explain the brown insides. (Late reply ;-;)

Comment on VI mode indicator in ZSH prompt by Paweł Gościcki

Sat, 28 Sep 2013 19:11:03 +0000

Wow! That is awesome, Ron! And the fix is so nice and simple! Thank you very much! As a side note, If I C-c while in CMD mode, I don't mind my prompt saying that I was in CMD mode when I did that. This is, in fact, what I would expect it to say, so I very much prefer your original solution. Thanks again!

Comment on VI mode indicator in ZSH prompt by TobiSGD

Fri, 27 Sep 2013 00:27:48 +0000

I just stumbled over this and this is exactly what I needed. Thanks Paul, thanks Ron.

Comment on VI mode indicator in ZSH prompt by Ron

Tue, 24 Sep 2013 15:35:14 +0000

FINAL(?) UPDATE: change my "zle reset-prompt" to: "zle && zle reset-prompt". Otherwise you'll get something like "TRAPINT:zle:2: widgets can only be called when ZLE is active" every time you interrupt anything BUT zsh all by itself. The initial no-argument call to zle will return 0 only if zle is not active, which lets us work right around the annoying behavior I'd accidentally written in there. So the whole function is... function TRAPINT() { vim_mode=$vim_ins_mode zle && zle reset-prompt return $(( 128 + $1 )) }

Comment on VI mode indicator in ZSH prompt by Ron

Tue, 24 Sep 2013 13:25:58 +0000

One more thing... With the TRAPINT function I listed, if you ctrl-C out of a prompt while in command-mode, the mode indicator ("[CMD]" in your case) will stick around in the terminal scrollback. This is not what I wanted to happen, so here's the solution. If you add "zle reset-prompt" right before the "return $(( 128 + $1 ))" statement, then the ctrl-C'd prompt will be reset to display the insert-mode indicator before the new prompt appears.

Comment on VI mode indicator in ZSH prompt by Ron

Mon, 23 Sep 2013 19:17:11 +0000

Regarding the issue where a ctrl-c in command mode makes the next prompt think it started in command mode, add the function to your .zshrc: function TRAPINT() { vim_mode=$vim_ins_mode return $(( 128 + $1 )) } The ctrl-c sends a SIGINT to the shell, which (as you've seen) appears to skip the {zle-line-finish, zle-line-init, zle-keymap-select} functions/widgets. My TRAPINT function above works around that fact by trapping on the SIGINT, manually resetting the prompt back to vim_ins_mode, and then re-propagating the SIGINT*, so anything else that depends on the SIGINT shouldn't break. Hope this helps! *from the "return" section of "man zshbuiltins" : "If return was executed from a trap in a TRAPNAL function[...] the numeric value of the signal which caused the trap is passed as the first argument, so the statement 'return $((128+$1))' will return the same status as if the signal had not been trapped."

Comment on VI mode indicator in ZSH prompt by Paweł Gościcki

Thu, 15 Aug 2013 14:44:04 +0000

@Sacha: I do not experience any blinking whatsoever. I'd recommend tweaking your prompt (removing all stuff and adding back in one by one) to find the culprit.

Comment on VI mode indicator in ZSH prompt by Sacha

Thu, 15 Aug 2013 14:39:42 +0000

Hey, thanks for the great zsh tips! This is the best solution I've found so far to the multiline + vim mode problem. However, with your approach, even though you've solved the deleting lines problem, I'm still finding that I get a rather annoying flicker whenever I switch modes. The prompt lines blank for some fraction of a second, Have you had this experience as well? Have you managed to fix it?

Comment on Crack your Windows password by Free Trial Review

Fri, 02 Aug 2013 16:55:06 +0000

Wonderful article! That is the kind of information that should be shared across the net. Disgrace on Google for now not positioning this submit higher! Come on over and visit my web site . Thank you =)