Why does vim delay for a second whenever I use the ‘O’ command (open a new line above and insert)?

When I use most commands, they take effect instantly. When I use the O command, however, I see the “O” replace the current character for a about a second, then the current character returns, and a new line is inserted and opened. I have no such problem with the o command (open a new line … Read more

How do I edit previous lines in a multiple line command in Bash?

When entering a command which spans multiple lines in Bash, how do I edit previous lines? I’m a Linux Mint (Lisa) user using GNOME Terminal. For example, let’s say I type: $ echo “foo bar > baz > And then when I’m about to type the third line of the command, suddenly realize I want … Read more

Is there any way to keep text passed to head, tail, less, etc. to be colored?

Is there any way to keep colorization of text passed through pipe | to head, tail, less, etc.? Answer I presume you are piping from ls and want to preserve the terminal color codes. You can say ls –color=always (instead of the default of –color=auto), which will preserve the codes, but that won’t guarantee that … Read more

How to make mouse wheel scroll the less pager using bash and gnome-terminal?

I have two computers with the latest Fedora. On the first, I’m using zsh and the mouse wheel can be used with the less pager within gnome-terminal to scroll the pager. On the second, I use bash and the mouse whell scroll the terminal history, not the pager. The shell shouldn’t make any difference, why … Read more

Open gnome terminal programmatically and execute commands after bashrc was executed

For starting my dev environment I wrote a little script. One part is to open a gnome terminal with several tabs where automatically some commands should be executed. Some of those commands depend on an already executed .bashrc. But when using gnome-terminal –tab -e “command” –tab –tab the command is executed before .bashrc was executed. … Read more

How to show output on terminal and save to a file at the same time?

I am using: user@unknown:~$ sudo command -option > log to save the results of “command” to the file “log”, but I’d like to also get the result on the terminal, is this possible? I am using ubuntu 10.04 lts. Answer Use tee. user@unknown:~$ sudo command -option | tee log AttributionSource : Link , Question Author … Read more

Slight delay when switching modes in vim using tmux or screen

Switching to and from insert mode in Vim is no longer instantaneous since I use tmux. After pressing Esc in insert mode, it takes a noticeable amount of time to actually get out of insert mode. After pressing Esc and any other key afterwards the switch is immediate, and the command for the key pressed … Read more

In vim, how can I quickly switch between tabs?

In gnome-terminal, I can just press Alt + (1, 2, 3, etc.) to switch to specific tabs. I can also use Ctrl + (PgUp / PgDn) to cycle through tabs (admittedly less convenient, but it can be remapped). If I want to use vim tabs instead of gnome-terminal tabs, typing :tabn and :tabp is quite … Read more

Way to avoid ssh connection timeout & freezing of GNOME Terminal

When I connect via ssh to certain servers, it timeouts and “freezes” the terminal (doesn’t accept input, doesn’t disconnect, can’t Ctrl-C to kill the ssh process or anything). This is in Ubuntu’s gnome-terminal though it seems to be pausing the terminal input/output, and doesn’t affect the operation of the GNOME Terminal software itself. So less … Read more