How do I convert dos files to linux files in vim?
If I open files I created in windows, the lines all end with ^M. How do I delete them all in once? ...
If I open files I created in windows, the lines all end with ^M. How do I delete them all in once? ...
I want to ditch my current editor. I feel I need something else. That do not expose my hands to the risk of RSI. I need to see why I should change editor. And it would be nice to believe, that I will be coding when I'm 80 years old. All the big guys out there are using Vim. The only Emacs guy I know are RMS. Paul Graham is a Vi dude. ...
When defining or calling functions with enough arguments to span multiple lines, I want vim to line them up. For example, def myfunction(arg1, arg2, arg, ... argsN-1, argN) The idea is for argsN-1 to have its 'a' lined up with args1. Does anyone have a way to have this happen automatically in vim? I've seen the align p...
If you go to a site such as: http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-c.html It has a bunch of example colour themes for VI. Does anyone know of a tool that would take those files and convert them into .vssettings files to use in Visual Studio? If not, how about some good docs on ether of the formats. ...
I'm using gvim on Windows. In my _vimrc I've added: set shell=powershell.exe set shellcmdflag=-c set shellpipe=> set shellredir=> function! Test() echo system("dir -name") endfunction command! -nargs=0 Test :call Test() If I execute this function (:Test) I see nonsense characters (non number/letter ASCII characters). If I use cm...
I've been using Lisp on and off for a while but I'm starting to get more serious about doing some "real" work in Lisp. I'm a huge Vim fan and was wondering how I can be most productive using Vim as my editor for Lisp development. Plugins, work flow suggestions, etc. are all welcome. Please don't say "use emacs" as I've already ramped up...
Post your favorite Vim tricks (or plug-ins or scripts). One trick per answer. Try to come up with something other than the basics, btw. :D ...
Is there a Vim shortcut for jumping to the argument list of the current function? I often find myself needing to mess with the argument list of a function, and it's kind of annoying to have to do ?def or ?function or 10k or what-have-you until I finally get to it, then /( or t( or 5e to get to the right position in the argument list, an...
Pretty basic question, I'm trying to write a regex in Vim to match any phrase starting with "abc " directly followed by anything other than "defg". I've used "[^defg]" to match any single character other than d, e, f or g. My first instinct was to try /abc [^\(defg\)] or /abc [^\<defg\>] but neither one of those works. ...
I've been somewhat spoiled using Eclipse and java. I started using vim to do C coding in a linux environment, is there a way to have vim automatically do the proper spacing for blocks? So after typing a { the next line will have 2 spaces indented in, and a return on that line will keep it at the same indentation, and a } will shift b...
Any other tweaks for making emacs as vim-like as possible would be appreciated as well. Addendum: The main reason I don't just use vim is that I love how emacs lets you open a file in two different frames [ADDED: sorry, this was confusing: I mean separate windows, which emacs calls "frames"]. It's like making a vertical split but I don...
I search for "nurple" in a file. I found it, great. But now, every occurrence of "nurple" is rendered in sick black on yellow. Forever. Forever, that is, until I search for something I know won't be found, such as "asdhfalsdflajdflakjdf" simply so it clears the previous search highlighting. Can't I just hit a magic key to kill the h...
Say in vim I want to search for $maximumTotalAllowedAfterFinish and replace it with $minimumTotalAllowedAfterFinish. Instead of typing the long text text: :%s/$maximumTotalAllowedAfterFinish/$minimumTotalAllowedAfterFinish/g Is there a way to COPY these long variable names down into the search line, since, on the command line I can't typ...
I want to use Vim's quickfix features with the output from Visual Studio's devenv build process or msbuild. I've created a batch file called build.bat which executes the devenv build like this: devenv MySln.sln /Build Debug In vim I've pointed the :make command to that batch file: :set makeprg=build.bat When I now run :make, the b...
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 its own tab. However, there are some things that get in the way of this. How do I fix these...
I am somewhat clumsy in my vi knowledge. I know how to generally move around in command mode, specifically, jumping to lines, etc. But what is the command to jump to the end of the line that I am currently on? ...
vi is for cool kids. ...
I am trying to display a live word count in the vim statusline. I do this by setting my status line in my .vimrc and inserting a function into it. The idea of this function is to return the number of words in the current buffer. This number is then displayed on the status line. This should work nicely as the statusline is updated at just...
I love vim and the speed it gives me. But sometimes, my fingers are too speedy and I find myself typing ":WQ" instead of ":wq" (on a German keyboard, you have to press shift to get the colon). Vim will then complain that 'W' is not an editor command. Is there some way to make W and Q editor commands? ...
I work with quite a bit of multi-platform C/C++ code, separated by common #defines (#if WIN, #if UNIX, etc). It would be nice if I could have vim automatically fold the sections I'm currently not interested in when I open a file. I've searched through the vim script archives, but I haven't found anything useful. Any suggestions? Plac...