developer

Paste in insert mode?

Question: ❓❓❓ Is it possible to paste in insert mode in vim? Good Answer: 👌👌👌 While in insert mode hit CTRL-R {register}. For example, CTRL-R * will insert in the contents of the clipboard and CTRL-R " (the unnamed register) inserts the the last delete or yank. To find this Read more…

By admin, ago
developer

How do I close all open tabs at once?

Question: ❓❓❓ If I have 10 tabs opened, I have to close each one using “:q” separately. How can I close them all at once? Good Answer: 👌👌👌 Shortest/simplest/fastest way would be: :qa To save work in all tabs and quit: :wqa Read More: 👉 https://stackoverflow.com/questions/510325/how-do-i-close-all-open-tabs-at-once

By admin, ago
developer

Using Vim’s tabs like buffers

Question: ❓❓❓ I have looked at the ability to use tabs in Vim (with :tabe, :tabnew, etc.) as a replacement for my current practice of having many files open in the same window in hidden buffers. I would like every distinct file that I have open to always be in Read more…

By admin, ago
developer

Renaming the current file in Vim

Question: ❓❓❓ How should I go about renaming my current file in vim. For example: I am editing person.html_erb_spec.rb I would like it renamed to person.haml_spec.rb I would like to continue editing person.haml_spec.rb How would I go about doing this, elegantly? Good Answer: 👌👌👌 There’s a little plugin that let’s Read more…

By admin, ago
developer

Using Caps Lock as Esc in Mac OS X

Question: ❓❓❓ How do I make Caps Lock work like Esc in Mac OS X? Good Answer: 👌👌👌 Here’s my attempt at a comprehensive, visual walk-through answer (with links) of how to achieve this using Seil (formerly known as PCKeyboardHack). First, go into the System Preferences, choose Keyboard, then the Read more…

By admin, ago
developer

What does ^M character mean in Vim?

Question: ❓❓❓ I keep getting ^M character in my vimrc and it breaks my configuration. Good Answer: 👌👌👌 Unix uses 0xA for a newline character. Windows uses a combination of two characters: 0xD 0xA. 0xD is the carriage return character. ^M happens to be the way vim displays 0xD (0x0D Read more…

By admin, ago