Search Results

Search found 1891 results on 76 pages for 'vim registers'.

Page 21/76 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • How to shortcut diamond character in vim

    - by temujin.ya.ru
    In the dictionary file, which I am editing I often need to insert character "?" on place of <. Is there a way to map "?" to some key so that I press "r" for replace and then my_shortcut to have < replaced by "?"? I found a way to make imap mapping in .vimrc: :imap <> ? But changing to inset mode is sub-optimal, would that be possible to make it all in replace mode and what should I write in .vimrc for that?

    Read the article

  • how to adjust the default width of taglist window in vim

    - by Haiyuan Zhang
    The default width of taglist window is too narrow for me and sometimes I can't see the whole function name in the window so I'd like to adujct the width of the window. I know use ctr-w > or ctr-w < I can adjust the window manually , but really want to change the default value of the taglisst window. so how I can actually do it ? thansk in advance.

    Read the article

  • Yank file name / path of current buffer in Vim

    - by Dave Tapley
    Assuming the current buffer is a file open for edit, so :e does not display E32: No file name. I would like to yank one or all of: The file name exactly as show on the status line, e.g. ~\myfile.txt A full path to the file, e.g. c:\foo\bar\myfile.txt Just the file name, e.g. myfile.txt

    Read the article

  • move vim cursor after a function

    - by emergence
    I'm using both the supertab and snipmate plugins. Let's say I'm using snipmate to create an if statement structure. Once I'm done adding statements inside the if-statement, how can I quickly move the cursor after the if-statement. For example: if [ $a = "b" ]; then bla; fi If my cursor is right on the semicolon and I'm in insert mode. What is the fewest number of actions I can take to move the cursor to the line after the 'fi'? If I press tab, supertab just open an autocomplete window. Thanks

    Read the article

  • vim is not obeying command aliases

    - by Nadal
    I use bash on mac and one of the aliases is like this alias gitlog='git --no-pager log -n 20 --pretty=format:%h%x09%an%x09%ad%x09%s --date=short --no-merges' However when I do :! gitlog I get /bin/bash: gitlog: command not found I know I can add aliases like this in my .gitconfig [alias] co = checkout st = status ci = commit br = branch df = diff However I don't want to add all my bash aliases to .gitconfig. That is not DRY. Is there a better solution?

    Read the article

  • How to Alphabetize a CSS file in Vim

    - by Kev
    I get a CSS file: div#header h1 { z-index: 101; color: #000; position: relative; line-height: 24px; margin-right: 48px; border-bottom: 1px solid #dedede; font-size: 18px; } div#header h2 { z-index: 101; color: #000; position: relative; line-height: 24px; margin-right: 48px; border-bottom: 1px solid #dedede; font-size: 18px; } I want to Alphabetize lines between the {...} div#header h1 { border-bottom: 1px solid #dedede; color: #000; font-size: 18px; line-height: 24px; margin-right: 48px; position: relative; z-index: 101; } div#header h2 { border-bottom: 1px solid #dedede; color: #000; font-size: 18px; line-height: 24px; margin-right: 48px; position: relative; z-index: 101; } I map F7 to do it nmap <F7> /{/+1<CR>vi{:sort<CR> But I need to press F7 over and over again to get the work done. If the CSS file is big, It's time-consuming & easily get bored. I want to get the cmds piped. So that, I only press F7 once! Any idea? thanks!

    Read the article

  • vim regex for replacing spaces within quotes

    - by vikram-bhat
    I have text in the follwing format: ERR_OUT_OF_MEM, "ERR OUT OF MEM" ERR_SOMETHING_BAD, "ERR SOMETHING BAD" I want to replace all spaces in the text which are within quotes with underscores: ERR_OUT_OF_MEM, "ERR_OUT_OF_MEM" ERR_SOMETHING_BAD, "ERR_SOMETHING_BAD" The best regex I could come up with is: \("\w\+\)\@<= (there's a space at the end of that) but this only finds the first space in each quoted string, and I would need to repeat this multiple times to get the desired effect. Any way to do it in one shot? Thanks!

    Read the article

  • regex unicode charater in vim

    - by aidan
    I'm being an idiot. Someone cut and pasted some text from microsoft word into my lovely html files. I now have these unicode characters instead of regular quote symbols, (i.e. quotes appear as <92 in the text) I want to do a regex replace but I'm having trouble selecting them. :%s/\u92/'/g :%s/\u5C/'/g :%s/\x92/'/g :%s/\x5C/'/g ...all fail. My google-fu has failed me.

    Read the article

  • How to delete empty lines in multi-ranges in Vim

    - by Kev
    I get a text file: <p>...</p> <pre> ... ... ... ... </pre> <p>...</p> <p>...</p> <p>...</p> <pre> ... ... ... </pre> <p>...</p> Notice that: there are some empty lines between [pre]...[/pre]. I want to delete them. But, I want keep those in [ p]...[/p] The text file becomes: <p>...</p> <pre> ... ... ... ... </pre> <p>...</p> <p>...</p> <p>...</p> <pre> ... ... ... </pre> <p>...</p> I use the cmd below to located them: /<pre>\n\zs\_.\{-}\ze\n<\/pre> But I don't know what to do next! I need a one-line-cmd to do this. Any idea? Thanks! The simpler, the better! Edit: Thank you all. I just figure out how to do it with the help of my another question :g/<pre>/,/<\/pre>/s/^$\n//

    Read the article

  • vim variable declaration

    - by dorelal
    I added following line of code in .vimrc let g:jslint_status = 'enabled' if exists("jslint_status") echo jstlint_status else echo 'not found' endif Error message E121: Undefined variable: jstlint_status E15: Invalid expression: jstlint_status What am I doing wrong?

    Read the article

  • VIM Replace word with contents of paste buffer?

    - by plong
    I need to do a bunch of word replacements in a file and want to do it with a vi command, not an EX command such as :%s///g. I know that this is the typical way one replaces the word at the current cursor position: cw<text><esc> but is there a way to do this with the contents of the unnamed register as the replacement text and without overwriting the register?

    Read the article

  • Problems making an accurate Visual Studio scheme for Vim (vim scheme specialist needed) .

    - by janoChen
    I'm trying to make an accurate Visual Studio scheme. I set hi function to blood color (#9A1102) for the "CSS function" (selector). But now the brackets with properties (id, class) in html elements also have blood color: (ironically the same color here in Stackoverflow). But I want them blue (#2902FC) e.g.: <div class="first"> <div id="nopic"> Sample of code: " Syntax highlighting hi Comment guifg=#777777 gui=none hi Todo guifg=#8f8f8f gui=none hi Constant guifg=#e5786d gui=none hi String guifg=#2902FC gui=none hi Identifier guifg=#2902FC gui=none hi Function guifg=#9A1102 gui=none hi Type guifg=#EF2811 gui=none hi Statement guifg=#9A1102 gui=none hi Keyword guifg=#9A1102 gui=none hi PreProc guifg=#2902FC gui=none hi Number guifg=#2902FC gui=none hi Special guifg=#2902FC gui=none " Bottom hi Question guifg=white gui=none hi Question ctermfg=white term=none hi ModeMsg guifg=white gui=none

    Read the article

  • Remove all arbitary spaces before a line in Vim

    - by Farslan
    I'v written a plugin where it comes to parsing a XML tag. The content inside the tag is indented and when i copy the parsed string into the file it's gettting like: Example line This is part of the parsed line Thats goes one End of line What I want is to remove all spaces in front of these lines, the final text should be Example line This is part of the parsed line Thats goes one End of line I've tried to use = but it doesn't work the way U want. How can I do that with minimal key strokes ?

    Read the article

  • vim - open file with complete path

    - by David Oneill
    If I have a file that contains a complete path for a file, is there a way to highlight the filename (using visual mode) and open the file? (preferably in a split screen) As I think about it, here is what I would like: if the file name contains a / character, assume it is a full path (IE the 'current directory' is root). Otherwise, use the current folder (IE default behavior) Is this possible?

    Read the article

  • creating a new dirctory in vim

    - by dorelal
    I have following setting which lets me easily create a new file from the currently open file map <Leader>e :tabe <C-R>=expand("%:p:h") . "/" <CR> Is there something similar which would let me create a directory from the current directory. Otherwise what are the other tricks you are using to create a directory and then create a file there.

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >