Search Results

Search found 5076 results on 204 pages for 'vim plugins'.

Page 12/204 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How to columnate text with tabs (in vim or on the shell)

    - by kine
    I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes, and when i do this it helps if the text is aligned properly into columns. For example (assuming 4-space tabs): # original format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 # ideal format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 I am very familiar with using the column utility to columnate text this way, but the problem is that it uses spaces to align the columns, and i specifically need tabs. This requirement also appears to rule out the Tabularize plug-in. Is there any way that i can columnate text with tabs specifically, either within vim or at the shell? It looks like i might be able to do it with groff/tbl, but honestly i'd rather columnate it by hand than mess with that....

    Read the article

  • Vim - select text highlighted by search?

    - by GorillaSandwich
    In vim, I often perform searches to hop to a word or phrase instead of navigating there with h/j/k/l. Then I hit n to hop between occurrences. Say I've got this text: Time flies like an arrow; fruit flies like a banana. - Groucho Marx I type /an arrow and hit enter. That phrase is highlighted, and I jump to it. Now I want to visually select that text, maybe to change it or delete it. (Yes, I'm aware of the :s substitution command.) Since my cursor is at the letter "a" at the beginning of "an arrow," I can hit v, then press e a couple of times to highlight the entire phrase. But I have a feeling there's a shorter and more semantic way. After all, I've already specified the text I'm interested in. How might I compose a command to say "visually select the current search selection?"

    Read the article

  • Misbehavior in regular expression in VIM

    - by poissonbreaker
    I am having a problem with a regular expression on vim. I have a pattern as follows: http:\/\/\(\w\+\.\?\)\+ [matches http://(AS MANY WORDS FOLLOWED BY DOT OR NOT ENCOUNTERS) e.g. http://wd1.wd2.com] I have a text as follows: http://wd1.wd2.com/wd3 I am trying to make this substitution on it: s/\(http:\/\/\)\(\w\+\.\?\)\+/\1wd4.wd5.com and the result is http://wd4.wd5.com /wd3 (Notice the white space inserted at the end of the replacement) How can I avoid having this inserted space? I am afraid is a bug in the regexp engine but I am not sure.

    Read the article

  • vim: sending tab-completion key against a mapped keystroke

    - by CDR
    To switch between buffers without installing any plugins, a good way is to type :b <tab> Which shows all the current buffers names in status bar and you can pick one using cursor keys and enter. But :b <tab> is 5 keystrokes and I would like to map it to a <leader>. But setting the following is not working. :nnoremap <Leader>. :b <Tab> It shows ":b ^I" in status bar and doesn't actually open the buffer names on status bar. Anyone knows why?

    Read the article

  • Puppet and Vim fighting over Ruby version

    - by devians
    I have installed puppet from the .dmg from puppetlabs. If I remove ruby 1.9.3, puppet works, but other things like my vim install (dependant plugins) do not. According to http://docs.puppetlabs.com/guides/platforms.html#ruby-versions 1.9.3 is supported. So whats going wrong with puppet? % uname -a Darwin Kusanagi.local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64 % which ruby /usr/local/bin/ruby % ruby --version ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin11.4.2] % /usr/bin/ruby --version ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0] % brew info ruby 1 ? ruby: stable 1.9.3-p327, HEAD http://www.ruby-lang.org/en/ Depends on: pkg-config, readline, gdbm, libyaml /usr/local/Cellar/ruby/1.9.3-p327 (796 files, 17M) * https://github.com/mxcl/homebrew/commits/master/Library/Formula/ruby.rb ==> Options --with-tcltk Install with Tcl/Tk support --with-suffix Suffix commands with "19" --universal Build a universal binary --with-doc Install documentation ==> Caveats NOTE: By default, gem installed binaries will be placed into: /usr/local/Cellar/ruby/1.9.3-p327/bin You may want to add this to your PATH. % puppet /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- puppet/util/command_line (LoadError) from /usr/local/Cellar/ruby/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /usr/bin/puppet:3:in `<main>'

    Read the article

  • gvim configuration does not work like it should

    - by ganjan
    Hi. I have a little problem with my vim config. This what I got in my home/user/.gvimrc syntax enable "Enable syntax hl colorscheme peaksea set background=dark set gfn=Inconsolata:h11 set nonu set history=1000 set scrolloff=3 set number " turn on line numbers " Save a global session file on session close nmap SQ <ESC>:mksession! ~/.vim/session/Session.vim<CR>:wqa<CR> function! RestoreSession() if argc() == 0 "vim called without arguments execute 'source ~/.vim/session/Session.vim' end endfunction autocmd VimEnter * call RestoreSession() The colorsheme work, but the font has way to much spacing. Every sentence is twice as long. I installed the Inconsolata font and I have the same config on my windows 7 box and it works fine.

    Read the article

  • iTerm2 vim cannot map alt key

    - by Eddy
    I'm having trouble trying to map the alt-key bindings on vim in iTerm2. I want to map shortcuts for switching between buffers like this: map <A-Right> <C-w>l map <A-Left> <C-w>h map <A-Down> <C-w>j map <A-Up> <C-w>k But I can't get it to work. I've tried everything, setting the option key as "Normal", "Meta" and "+Esc" in the profile settings. I've tried <M-Right> and <T-Right> but those don't work either. There are posts on superuser and stackoverflow but they use the old version of iTerm2 (v0.x). The only things I've managed to get working are <T-up> and <T-down>, or when I just use Macvim. I'm using iTerm2 v1.0.0.20120203, and Mac OS X 10.7.5 on a Macbook Pro.

    Read the article

  • Weird rendering artefact in vim (terminal, not MacVim)

    - by Tobi Lehman
    Running Mac OS X, using either Terminal.app or iTerm2, there is a strange artefact with the character rendering that I have a hard time explaining and an even harder time understanding. I'll start with a video of my screen so that you can see and example of it in action: From the video you can see a few ways it is weird, for example, sometimes when I hit a letter in insert mode, the character is double printed. When I go into normal mode, the artefact remains. When I re-enter insert mode, hitting backspace copies the characters on the left to the position under the cursor. This has happened in OS X Lion, and Mountain Lion, under both Terminal.app and iTerm 2. This never happens under MacVim. Also, I use GNU/Linux on my other machine, and have never had this happen, I am pretty sure it is strictly a Mac OS X issue, but I do not know how to fix it. For a while, I've been working around it by using MacVim most of the time, but I prefer working in a terminal. Does anyone know what is happening here, and if so, how can I fix it? EDIT: I tried using the macvim Vim executable, and I still get strange artefacts, but they are localized to the left side of the screen, here is an example:

    Read the article

  • Vim move cursor one character in insert mode without arrow keys

    - by bolov
    This might seem a little too overboard, but I switched to vim and I so happy about the workflow now. I try to discipline myself not to use the arrow keys, as keeping the hands on the alfa-keys all the time is such a big thing when writing. So when I need to navigate I get out of insert mode, move in normal mode and get back in insert mode. There is an exception where this is actually more disrupting: I use clang complete with snippets and super tab which is great. Except every time I get a function auto completed after I fill in the parameters I am left with the cursor before ) so to continue I have to move the cursor one character to the right. As you can imagine this happens very often. The only options I have (as far as I know) are : Escla or ?, and I am not happy about neither of them. The first one makes me hit 3 keys for just a simple 1 character cursor move, the second one makes me move my hand to the arrow keys. A third option would be to map CTRL-L or smth to ?. So what is the best way of doing this? //snippets (clang complete + supertab): foo($`param1`, $`param2`) //after completion: foo(var1, var2|) ^ ^ | | I am here | Need to be here | denotes cursor position

    Read the article

  • Encoding over SSH Issues

    - by user1104160
    I have a Linux machine and a Windows machine, both using Vim with the Powerline plugin. They both work great with patched fonts. Next, I want to SSH onto an OSX 10.6 machine and also use the Powerline in the terminal with Vim. However, I get weird symbols with normal mode ("^^B" in one area) and fancy mode ("~@" and "~B" spread throughout the bar. I thought this mixup was an encoding issue, but when I look at Putty's encoding it is using UTF-8 and the same with the Ubuntu terminal. Additionally, on the OSX machine, "locale" returns "en_US.UTF-8" for all variables (I set it to do that in order to troubleshoot). However, the symbols are still showing. I am using a patched font (Inconsolata, the same one as the Ubuntu terminal) for the OSX terminal, so I am stumped. Is there a missing component to this equation? Are there additional problems that can arise from SSH encoding? On the OSX end, additionally, these same symbols appear, so it may not even be related to SSH and therefore I'm totally lost.

    Read the article

  • Indentation annoyance with CSS in Vim

    - by Johan Sahlén
    I've moved from TextMate to Vim lately, and am really liking the switch. However, I have an itch regarding the way Vim handles indentation within curly braces using the CSS syntax. I use simple_pairs.vim, which may or may not have something to do with my problem, but I don't think so, as things work fine in PHP, JavaScript, etc. Let me explain… I generally group my CSS rules by context using indentation, like so: ul#nav { margin: 10px; } ul#nav li { float: left; margin-right: 4px; } That means when I type my ul#nav li rule, followed by { (which inserts a corresponding } automatically) and hit enter, I want the closing brace to be at the same indentation level as the ul#…, but instead I get something like this: ul#nav { margin: 10px; } ul#nav li { } So I have to indent the extra step(s) manually. Like I said, doing the same thing in PHP, JavaScript, etc, works fine. Does anyone know how I can fix this? I don't understand enough of Vim's syntax definition files for me to be able to figure out what in the PHP syntax file makes it work, and port it over to the CSS one… Thanks.

    Read the article

  • Making Vim auto-indent PHP/HTML using alternative syntax

    - by njbair
    I edit PHP in Vim and have enjoyed the auto-indenting, but PHP's alternative syntax doesn't auto-indent how I would like. For instance, in an HTML template, Vim doesn't recognize the open control structure in the same way it does when using braces. Example: <html> <body> <p> <?php if (1==1): ?> This line should be indented. <?php endif; ?> </p> </body> </html> I want Vim to recognize the open control structure and indent the HTML within it. Another example which uses pure PHP: <?php if (1==1): echo "This line gets indented"; echo "This one doesn't"; endif; ?> The indentation is terminated by the semicolon, even though the control structure is still open. Does anybody know how to get Vim to work in these situations? Thanks.

    Read the article

  • Vim: change formatting of variables in a script

    - by sixtyfootersdude
    I am using vim to edit a shell script (did not use the right coding standard). I need to change all of my variables from camel-hum-notation startTime to caps-and-underscore-notation START_TIME. I do not want to change the way method names are represented. I was thinking one way to do this would be to write a function and map it to a key. The function could do something like generating this on the command line: s/<word under cursor>/<leave cursor here to type what to replace with> I think that this function could be applyable to other situations which would be handy. Two questions: Question 1: How would I go about creating that function. I have created functions in vim before the biggest thing I am clueless about is how to capture movement. Ie if you press dw in vim it will delete the rest of a word. How do you capture that? Also can you leave an uncompleted command on the vim command line? Question 2: Got a better solution for me? How would you approach this task?

    Read the article

  • How to Detect that Current (Bash) Shell is a (Vi/Vim) Subshell?

    - by Jeet
    From inside Vi/Vim, I can type: :shell to drop into a shell. Is there any way to detect that I am in a Vi-spawned subshell? The environmental variable SHLVL is 2, but that does not tell me explicitly that I am in a Vi/Vim-spawned subshell. On OS X, the following variables are also set: MYVIMRC, VIMRUNTIME, VIM. How universal are these? Can I count on these being set in any system, if and only if I am in a Vi/Vim subshell? If not, is there any portable, robust and hopefully efficient way to tell that I am in a Vi/Vim subshell? Thanks.

    Read the article

  • Can I copy from vim to another window without +xterm-clipboard?

    - by GorillaSandwich
    I'm using Ubuntu and vim. I can copy text from vim and paste it into another window by highlighting it in vim, then middle-clicking in the other window. This works fine when I'm on my local machine. I can also copy into the system register by highlighting text and yanking to the system register. (For example, Shift-V JJ "+ y to go into linewise visual mode, highlight two lines, select the '+' register and yank.) It's then available to paste into other windows. However, if I ssh into my web host, I can't do either of these. (They use some flavor of Linux - I think it's CentOS.) In vim, if I type :version, my local version shows +xterm_clipboard, but the host's version shows -xterm_clipboard. I don't have sudo rights there. Is there any way to be able to copy from their vim without getting them to tinker with the installation?

    Read the article

  • how to temporarily set makeprg in vim

    - by Haiyuan Zhang
    In the normal case I use vim's make utility I will set makeprg to the Makefile of the project I'm currently working for. Since usually the project will last for weeks or even longer, I don't need to change the setting of makeprg very often . But sometimes I need to write some "foobar" code either for practicing my c++ skill or for prototyping some primitive ideas in my mind. So whenever I switch to the "foobar" mode of vim usage, I need to comments the original makeprg setting add the new setting as following : au FileType c set makeprg=gcc\ % au FileType cpp set makeprg=g++\ % which is really very very inconvenient . when I back to the "normal project mode" of vim usage, I need to change back to the original setting . back and forth .... what I want to know from you guys is that : is it possible to make the setting of makeprg temporarily . for example , define a function in which first set a local value of makeprg and then call make before return form the function call automatically restore makeprg to the value before the function call.

    Read the article

  • vim filters and stdout/stderr

    - by ahe
    When I use :%! to run the contents of a file through a filter and the filter fails (it returns another code than 0) and prints an error message to stderr I get my file replaced with this error message. Is there a way to tell vim to skip the filtering if the filter returns an status code that indicates an error and/or ignore output the filter program writes to stderr? There are cases where you want your file to replaced with the output of the filter but most often this behavior is wrong. Of course I can just undo the filtering with one keypress but it isn't optimal. Also I have a similar problem when writing a custom vim script to do the filtering. I have a script that calls a filter program with system() and replaces the file in the buffer with its output but there doesn't seem to be a way to detect if the lines returned by system() where written to stdout or to stderr. Is there a way to tell them apart in vim script?

    Read the article

  • vim command to restructure/force text to 80 columns

    - by wickedchicken
    I know there are ways to automatically set the width of text in vim using set textwidth (like http://stackoverflow.com/questions/235439/vim-80-column-layout-concerns). What I am looking for is something similar to = (the indent line command) but to wrap to 80. The use case is sometimes you edit text with textwidth and after joining lines or deleting/adding text it comes out poorly wrapped. Ideally, this command would completely reorganize the lines I select and chop off long lines while adding to short ones. An example: long line is long! short After running the command (assuming the wrap was 13 cols): long line is long! short If this isn't possible with a true vim command, perhaps there is a command-line program which does this that I can pipe the input to?

    Read the article

  • Launching Vim via Lua

    - by Keith Pimmel
    I'm writing a simple little Lua commandline app that will build a static website. I'm storing my fragments in a sqlite database. Retrieving the data from the db is straightforward as is saving it; my question comes from editing the data. Is there an elegant way to pipe the data from Lua to vim? Can vim edit a memory buffer and return it? I was planning on launching the editor via os.execute('vim') but only after grabbing a temporary file handle and dumping the database output into that. I would like to have to avoid touching the filesystem that way but that is my contingency plan.

    Read the article

  • Vim: Goot AutoCompletion Plugin for Python and PHP

    - by Rafid K. Abdullah
    I use Vim with ctags for development. I found ctags to be very useful in going to definitions, but I don't know a good plugin to make use of ctags for clever auto completion. It seems that the default Vim auto completion is not good. When I write set omnifunc? in Vim, I get this: omnifunction=pythoncomplete#Complete I do know about OmniComplete for C++, but I don't know any good plugin for Python and PHP. Does anybody have an idea?

    Read the article

  • Notepad++ like "multi editing" in VIM?

    - by proto-n
    I'm switching from Notepad++ to VIM as main text editor. Notepad++ can have multiple cursors by holding down ctrl and clicking anywhere in the text, so if you type, the text appears in multiple locations. Is it possible in vim? Something like insert after selecting multiple rows in visual mode, but with the possibility to have cursors anywhere in the text. It's a feature I rarely use, also it's quite easily avoidable, I'm just curious, since its the only one I could't find a replacement for in vim yet.

    Read the article

  • QPluginLoader with PyQt modules as plugins: possible?

    - by Thorfin
    Hi! I have a C++ application that loads externals plugins thanks to QPluginloader. QPluginLoader provides access to a Qt plugin. A Qt plugin is stored in a shared library (a DLL). The plugins have to inherit from a pure virtual class ( and Q_DECLARE_INTERFACE ) and QObject. I would like to create plugins by using python and PyQt. Is this possible without too much work? For instance if I have to convert the modules to C++ with boost::python, this could be nonsense, as PyQt is already a conversion from C++ to Python... Thanks!

    Read the article

  • How to download Vim script on the command-line?

    - by HaiYuan Zhang
    Whenever I want to install a new Vim script on the Linux server I'm working on, my typical workflow is as the following: surf the plugin's homepage in Vim online using FireXXXX download a right version of the plugin to my laptop by click some highlighted link upload the downloaded plugin from my laptop to Linux server using WinSCP which is really inconvenient. I don't know what is the magic behind this: I mean for the same hyperlink I click it in web browser. I can let you download it but use Wget plus the hyperlink in Linux command-line will end up with nothing but an error indication. Hyperlink in the web browser. Otherwise I can get the link in web browser and then use Wget or some similar tool to actually do the downloding. I try new cool Vim scripts quite ofte , so you can imagine my dismay when I have to repeat the tedious action all the time. What are some tips which can let me download the Vim scripts in a more "professional" way? Post edit: My problem is not find a tool like Wget or cURL. The problem I met is quite specific; to use these tools to download a Vim script. Let's take http://www.vim.org/scripts/script.php?script_id=30 as an example. It's the normal place where one can get the script, at least for me. But I can't find an working URL from this page that can feed to Wget.

    Read the article

  • Eclipse Java EE - Galileo - Unable to view plugins

    - by Dis
    I am new to Eclipse so I am having a hard time troubleshooting this problem. I have a new installation of Eclipse Java EE - Galileo on Windows, and I am unable to see any changes made in the IDE after installing plugins. I have verified that the plugins are installed via installation details, but see no changes made. For example, after installing the maven integration plugin m2eclipse I go to File-New-Project ... and I have no option for maven. After installing the QuickRex plugin I have no view for it etc. I have tried re-installing the plugins, re-installing Eclipse, and starting Eclipse with the -clean option, but nothing has resolved the issue. Any ideas? Thanks!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >