Questions Tagged With vihttp://linuxexchange.org/tags/vi/?type=rssquestions tagged <span class="tag">vi</span>enThu, 19 Aug 2010 21:47:24 -0400vim indentationhttp://linuxexchange.org/questions/1252/vim-indentation<p>I'm using vim to edit files that use a programming language where the end of line is not marked with ;. This causes problems when I try to fix indentation in vim. If I put a ; at the end then vim is able to correctly fix the indentation, but since this programming language doesn't have a ; at the end of a statement the indentation isn't correct after vim tries to fix it. How can vim be modified so that it works correctly with this programming language?</p>PhenomThu, 19 Aug 2010 21:47:24 -0400http://linuxexchange.org/questions/1252/vim-indentationvimviWhat is your text editor of choice?http://linuxexchange.org/questions/901/what-is-your-text-editor-of-choice<p>I was curious to know what is the editor of choice for my fellow Linux users. For years it has been a vi vs. emacs debate but it appears there many more. Please reply with your favorite editor. I personally prefer vim.</p>AndyWed, 23 Jun 2010 14:54:09 -0400http://linuxexchange.org/questions/901/what-is-your-text-editor-of-choiceshellviemacsHow do you comment out several lines in vi at once?http://linuxexchange.org/questions/337/how-do-you-comment-out-several-lines-in-vi-at-once<p>Lets say I have a block of text:</p> <pre><code>def blarg_func: blarg = 1 return blarg </code></pre> <p>and I want to comment it all out in vi</p> <pre><code>#def blarg_func: # blarg = 1 # return blarg </code></pre> <p>What I usually do is go to the first line and hit "^i" and then enter "#". next I arrow down to the next line and hit "." and then repeat until all the lines are commented. </p> <p>If I hit "2" then "." it will give me.</p> <pre><code>#def blarg_func: ## blarg = 1 return blarg </code></pre> <p>I know I can do this with numbered lines, like </p> <pre><code>:1,3s/^/#/ </code></pre> <p>but I want to be able to do this without having to enter line numbers.</p> <p>Keep in mind I am using vi not vim, so "^v" will not work. </p>JoehillenThu, 06 May 2010 18:47:27 -0400http://linuxexchange.org/questions/337/how-do-you-comment-out-several-lines-in-vi-at-oncevi