Search Results

Search found 1329 results on 54 pages for 'vim'.

Page 15/54 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Getting automatic matching brace in vim

    - by Bob
    I spend WAY to much time fumbling around because vim doesn't handle closing braces like most IDEs do. Here's what I want to happen: type this: if( whatever ) { <CR> where <CR> mean hit the enter key and get this: if( whatever ) { | } where | is the position of the cursor. It's what Eclipse does. It's what Visual Studio does. And it's what I want Vim to do. I've seen a few plugins, tried a few, and none of them seem to give me this behavior. Surely I can't be the first programmer to want this.

    Read the article

  • Looking for a VIM Book

    - by sixtyfootersdude
    I have been using vim for about six months now. I know my way around pretty well. I know all of the "basic commands", have defined my own functions and have defined some syntax files. I was hopping to pickup a book on vim to read in my spare time. There is nothing specific that I want to learn I just want to improve my general knowledge. I looked on amazon and there are about 7 possibilities. Any recommendations?

    Read the article

  • Vim's autocomplete is excruciatingly slow

    - by jnicklas
    Most of the time the autocomplete feature in VIM works nicely for me, but sometimes it seems to be scanning files which the current file references, and then it becomes painfully slow, sometimes taking several seconds to release focus back to me. Sometimes VIM tells me simply that it is "Scanning" other times, it's saying "Scanning tags" I've only this happen in Ruby files, and it happens mostly when there is a require in the file. My guess would be that this is some kind of feature which checks related files for autocomplete options, but I don't really need that, and would prefer quicker autocomplete.

    Read the article

  • Vim: `cd` to path stored in variable

    - by tsyu80
    I'm pretty new to vim, and I'm having a hard time understanding some subtleties with vim scripting. Specifically, I'm having trouble working with commands that expect an unquoted-string (is there a name for this?). For example cd some/unquoted/string/path The problem is that I'd like to pass a variable, but calling let pathname = 'some/path' cd pathname will try to change the current directory to 'pathname' instead of 'some/path'. One way around this is to use let cmd = 'cd ' . pathname execute cmd but this seems a bit roundabout. This StackOverflow question actually uses cd with a variable, but it doesn't work on my system ("a:path" is treated as the path as described above). I'm using cd as a specific example, but this behavior isn't unique to cd; for example, the edit command also behaves this way. (Is there a name for this type of command?)

    Read the article

  • Vim with Powershell

    - by Kevin Berridge
    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 cmd as the shell, it works (without the -name), so the problem seems to be with getting output from powershell into vim. Interestingly, this works great: :!dir -name As does this: :r !dir -name UPDATE: confirming behavior mentioned by David If you execute the set commands mentioned above in the _vimrc, :Test outputs nonsense. However, if you execute them directly in vim instead of in the _vimrc, :Test works as expected. Also, I've tried using iconv in case it was an encoding problem: :echo iconv( system("dir -name"), "unicode", &enc ) But this didn't make any difference. I could be using the wrong encoding types though. Anyone know how to make this work?

    Read the article

  • How can I pare down Vim's buffer list to only include active buffers

    - by nelstrom
    How can I pare down my buffer list to only include buffers that are currently open in a window/tab? When I've been running Vim for a long time, the list of buffers revealed by the :ls command is too large to work with. Ideally, I would like to delete all of the buffers which are not currently visible in a tab or window by running a custom command such as :Only. Can anybody suggest how to achieve this? It looks like the :bdelete command can accept a list of buffer numbers, but I'm not sure how to translate the output from :ls to a format that can be consumed by the :bdelete command. Any help would be appreciated. Clarification Lets say that in my Vim session I have opened 4 files. The :ls command outputs: :ls 1 a "abc.c" 2 h "123.c" 3 h "xyz.c" 4 a "abc.h" Buffer 1 is in the current tab, and and buffer 4 is in a separate tab, but buffers 2 and 3 are both hidden. I would like to run the command :Only, and it would wipe buffers 2 and 3, so the :ls command would output: :ls 1 a "abc.c" 4 a "abc.h" This example doesn't make the proposed :Only command look very useful, but if you have a list of 40 buffers it would be very welcome.

    Read the article

  • Vim hanging after parsing .vimrc (even a blank one) file on Solaris 10

    - by Seamus
    Hello all, I am having a problem with vim 7.2 hanging (for about 10 seconds) after it parses the .vimrc file. I had a similar issue in the past with tcsh on linux, but it was resolved by setting TERM to xterm-color. The same does not resolve the issue here. Any idea what may be causing this? $ env USER=redacted LOGNAME=redacted HOME=/home/redacted PATH=redacted MAIL=/var/spool/mail/redacted SHELL=/bin/tcsh TZ=redacted LC_COLLATE=C SSH_CLIENT=redacted SSH_CONNECTION=redacted SSH_TTY=/dev/pts/11 TERM=dtterm HOSTTYPE=sun4 VENDOR=sun OSTYPE=solaris MACHTYPE=sparc SHLVL=1 PWD=/home/redacted GROUP=redacted HOST=redacted REMOTEHOST=redacted QUOTA_CHECKED=1 WHOAMI=redacted HOSTNAME=redacted EDITOR=vim PRINTER=redacted INFOPATH=/software/gnu/gcc/2.8.1/sun4os5.10/info:/software/gnu/sun4os5/info:/software/gnu/emacs/20.3.1/sun4os5/info:/software/gnuish/sun4os5/info:/usr/local/gnu/info MANPATH=/software/gnu/gcc/2.8.1/sun4os5.10/man:/software/gnu/sun4os5/man:/software/gnu/emacs/20.3.1/sun4os5/man:/opt/rational/clearcase/doc/man:/usr/openwin/man:/usr/share/man:/usr/local/man:/usr/dt/man:/software/gnuish/sun4os5/man H_ARCH=sun4 H_ARCHOS=sun4os5 H_ARCHOS_SUB=sun4os5.10 H_OSTYPE=SUNOS H_OSREV=51000 T_ARCH=sun4 T_ARCHOS=sun4os5 T_ARCHOS_SUB=sun4os5.10 T_OSTYPE=SUNOS T_OSREV=51000 X11HOME=/usr/local/x11/sun4os5 OPENWINHOME=/usr/openwin LD_LIBRARY_PATH=/usr/dt/lib:/usr/openwin/lib MOTIFHOME=/usr/dt XINITRC=/usr/openwin/lib/Xinitrc GCC_REV=281

    Read the article

  • How to comment out a block of Python code in VIM

    - by Rishabh Manocha
    I was wondering if there was any key mapping in VIM to allow me to indent certain lines of code (whether those lines have been selected in visual mode, or n lines above/below current cursor position). So basically something that converts the following def my_fun(x, y): return x + y to #def my_fun(x, y): # return x + y I am ok with using either # or """ for commenting out the relevant lines. Ideally, I would also like the same keymapping to uncomment the lines if the given lines have been commented out. Thanks

    Read the article

  • vim superuser mode

    - by Hulk
    After opening a file in vim,And if that file is created by root .How to change the current user to superuser mode without quitting or before saving. Thanks.

    Read the article

  • Ruby refactoring in VIM

    - by fregas
    Hi, I'm a big fan of Resharper in visual studio. It has some awesome refactoring tools, similar to what you get in Ecplipse for Java. Is there anything like this for Ruby? Better yet, is there a plugin or something into VIM that does refactoring for Ruby code like renaming all instances of a method or variable, renaming classes sitewide, etc? thanks, craig

    Read the article

  • not able to get cscope working with vim

    - by hiren panchasara
    Hi all, I am trying to setup cscope to work with vim, following http://cscope.sourceforge.net/cscope_vim_tutorial.html. When I get into a C file, I am not able to do what is described in bullet 5 of the link. Do I need to setup ctags? Is there something not mentioned here on the page that I should be doing? Thanks in advance.

    Read the article

  • Vim & Java: add java import statements automatically

    - by HH
    The tip. The errors are "E349: No identifier unders cursor", "E433: No tags file" and "E426: tag not found: public". I feel them unrelated or I cannot understand their message. I have the code in "~/.vimrc" and pressed "F1", "F9" and "ESC". A related tip but more advanced. so how can I add Java import statements automatically in Vim?

    Read the article

  • Scrolling inside Vim in Mac's Terminal

    - by hora
    I've been googling around trying to figure out if it's possible to use my mouse wheel to scroll while inside Vim in Mac's Terminal, with no luck. It seems as if only X11 or iTerm support this. Before I give up, I thought I'd try the geniuses here to see if anyone knows a way to do this. So, does anyone know if I can set that up? Or should I seriously consider using a different terminal application?

    Read the article

  • strange behavior in vim with negative look-behind

    - by João Portela
    So, I am doing this search in vim: /\(\(unum\)\|\(player\)=\)\@<!\"1\" and as expected it does not match lines that have: player="1" but matches lines that have: unum="1" what am i doing wrong? isn't the atom to be negated all of this: \(\(unum\)\|\(player\)=\) naturally just doing: /\(\(unum\)\|\(player\)=\) matches unum= or player=.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >