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

Insert a new line with a backslash with one key bind #4463

Conversation

s417-lama
Copy link
Contributor

Description

Add an input function 'new_line_with_backslash' and bind it to 'Ctrl-o' temporarily.

For example,

$ ps aux

and when we press Ctrl-o, a space, a backslash and a newline will automatically entered:

$ ps aux \
  (cursor is here) 

Then, we can write scripts like below more smartly by using this function, I think.

$ ps aux \
  | grep fish \
  | awk '{print $2}' \
  | xargs kill -9

It's better if it can be done with Shift+Enter, but most terminals treat 'Enter' and 'Shift+Enter' as the same and I couldn't.

@faho
Copy link
Member

faho commented Oct 10, 2017 via email

@s417-lama
Copy link
Contributor Author

I didn't know that! Thank you.

@s417-lama s417-lama closed this Oct 11, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants