Skip to content
0:00 / 0:00

#bash#vim#terminal

Efficient Command Line Usage With Ctrl-x + Ctrl-e

Web Dev with Matt

1.8K subscribers • 1 video on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.

Beginner. No background in the topic needed.

2K views6 years ago1 recommendation

Tools and practiceThe shell and command lineVim, Emacs and editorsLinux

How to use the Ctrl-x Ctrl-e shortcut in Bash to edit long command-line inputs inside Vim.

In this video I show you an awesome trick to becoming vastly more efficient at the command line: ctrl-x ctrl-e! With this keyboard combination you’ll be able to edit commands in your editor of choice before running them. Doing this will save you loads of time, compared to editing them directly on the command line itself. Please * LIKE, COMMENT, AND SUBSCRIBE * and share with others! SUBSCRIBE ➜ eepurl.com/bvRPzD BLOG ➜ matthewsetter.com/blog/ TWITTER ➜ twitter.com/webdevwithmatt INSTAGRAM ➜ instagram.com/webdevwithmatt If you like the video or the channel and want to support it, how about buying me a coffee: buymeacoffee.com/webdevwithmatt. #bash #keyboardshortcuts #linux #terminal #commandline

Why it's here

1 person recommends this

What people say. Recommended as an essential terminal shortcut that lets you edit command lines using Vim's full power.

u/pmmeurcatgifsin r/vim • Recommends

I regret not knowing this terminal shortcut! Export and edit your currently typed terminal command query into a vim buffer by pressing " Ctrl + x + e ". Honestly, this is much better than the "set -o vi" command. Because exporting your command into a vim buffer allows you to use commands like change, delete, visual select, or yank cdvy inside or around the words/sentences/paragraphs. Everyone knows Vim has far more functionality than the Vi editor. This helped me loads in editing lengthy terminal chain commands. To paste the edited command back into terminal, just use your preferred Vim save command (I prefer Shift + zz). To know more, watch this video: link to this video