tagged [vim]

Indent multiple lines quickly in vi

Indent multiple lines quickly in vi It should be trivial, and it might even be in the help, but I can't figure out how to navigate it. How do I indent multiple lines quickly in vi?

29 Oct at 09:54

How to temporarily exit Vim and go back

How to temporarily exit Vim and go back How could I exit Vim, not `:q`, and then go back to continue editing?

12 Sep at 14:54

set gvim font in .vimrc file

set gvim font in .vimrc file I am using gVim 7.2 on Windows 7. I can set the gui font as Consolas 10 (font size) from the menu. I am trying to set this in `.vimrc` file like below: But it doesn't work...

19 Jul at 21:40

How I can delete in VIM all text from current line to end of file?

How I can delete in VIM all text from current line to end of file? I have very large files (more than 10Gb). I need only some lines from the top of the file. Is it possible (in vim) to delete the rest...

3 Jul at 12:46

Replace tabs with spaces in vim

Replace tabs with spaces in vim I would like to convert tab to spaces in gVim. I added the following line to my `_vimrc`: It works to stop at two spaces but it still looks like one tab key is inserted...

23 May at 02:29

How to replace a character by a newline in Vim

How to replace a character by a newline in Vim I'm trying to replace each `,` in the current file by a new line: But it inserts what looks like a `^@` instead of an actual newline. The file is not in ...

12 Apr at 13:18

delete word after or around cursor in VIM

delete word after or around cursor in VIM I'm now switching to `VIM` from TextMate. I found `^+W` in INSERT mode very useful. However, I'd like to delete not only the word before cursor, but the word ...

19 Jan at 15:35

How to set default vim colorscheme

How to set default vim colorscheme The latest upgrade of Ubuntu made my vim colorscheme unusable. I know how to set it manually (`:colo evening`, for example), but I want to set the default for all vi...

20 Sep at 07:4

What Vim command(s) can be used to quote/unquote words?

What Vim command(s) can be used to quote/unquote words? How can I quickly quote/unquote words and change quoting (e.g. from `'` to `"`) in Vim? I know about the [surround.vim](https://github.com/tpope...

16 Jun at 00:1

Paste in insert mode?

Paste in insert mode? Is it possible to paste in insert mode in Vim?

24 May at 17:55

Turning off auto indent when pasting text into vim

Turning off auto indent when pasting text into vim I am making the effort to learn Vim. When I paste code into my document from the clipboard, I get extra spaces at the start of each new line: I know ...

Changing Vim indentation behavior by file type

Changing Vim indentation behavior by file type Could someone explain to me in simple terms the easiest way to change the indentation behavior of Vim based on the file type? For instance, if I open a P...

31 Oct at 09:41

What is in your .vimrc?

What is in your .vimrc? Vi and Vim allow for really awesome customization, typically stored inside a `.vimrc` file. Typical features for a programmer would be syntax highlighting, smart indenting and ...

25 Sep at 20:50

What is your most productive shortcut with Vim?

What is your most productive shortcut with Vim? I've heard a lot about [Vim](http://www.vim.org/), both pros and cons. It really seems you should be (as a developer) faster with Vim than with any othe...

16 Aug at 10:58

How to go back (ctrl+z) in vi/vim

How to go back (ctrl+z) in vi/vim In normal text editors [with all due respect to Vim] there is a shortcut + when you have done something nasty and want to return to the previous version of the text. ...

15 Aug at 10:42

Vim with Powershell

Vim with Powershell I'm using gvim on Windows. In my _vimrc I've added: If I execute this function (:Test) I see nonsense characters (non number/letter ASCII characters). If I use cmd as the shell, it...

23 May at 12:34

Is there any way to get vim to auto wrap python strings at 79 chars?

Is there any way to get vim to auto wrap python strings at 79 chars? I found this [answer](https://stackoverflow.com/questions/1302364/python-pep8-printing-wrapped-strings-without-indent/1302381#13023...

23 May at 11:48

How to copy selected lines to clipboard in vim

How to copy selected lines to clipboard in vim How to copy selected lines to clipboard in vim. I know how to do it for [all text files](https://stackoverflow.com/q/1620018/1082727), but I want to do i...

23 May at 10:31

What is the difference between MacVim and regular Vim?

What is the difference between MacVim and regular Vim? I'm reasonably new to OS X, but I'm familiar with Vim from using it in various *nix systems. I've seen many people recommend running MacVim over ...

26 Apr at 23:49

How can I enable VIM for mac in Visual Studio?

How can I enable VIM for mac in Visual Studio? I just got Visual Studio for my Mac. Although in Beta, it seems nice. Unfortunately, I can't seem to figure out where VIM could be. I've searched the mar...

23 Apr at 09:13

Working with huge files in VIM

Working with huge files in VIM I tried opening a huge (~2GB) file in VIM but it choked. I don't actually need to edit the file, just jump around efficiently. How can I go about working with very large...

21 Jan at 23:33

How do I run a terminal inside of Vim?

How do I run a terminal inside of Vim? I am used to Emacs, but I am trying out Vim to see which one I like better. One thing that I like about Emacs is the ability to run a terminal inside Emacs. Is t...

31 Dec at 12:30

How can I use VIM to do .Net Development

How can I use VIM to do .Net Development Visual Studio is the defacto editor, but what are our other options that avoid a heavy UI while still integrating with a C# build chain? Looking for options wh...

4 Oct at 13:52

How do I switch between command and insert mode in Vim?

How do I switch between command and insert mode in Vim? I just started using Vim as an IDE. I was using it as a test editor for a while now, so I didn't have to go to command mode very often. But, sin...

29 Apr at 14:22

Viewing all `git diffs` with vimdiff

Viewing all `git diffs` with vimdiff I setup `git diff` to wrap into vimdiff, using "[Git Diff with Vimdiff](http://technotales.wordpress.com/2009/05/17/git-diff-with-vimdiff/)" as a guide, and it's w...

20 Apr at 16:34