<bairui>    maybe. maybe not. There is no harm in having a general omni as well as file-specidic omnis
<sabgenton>    ok
*    jhoepken (~jhoe...@dslb-088-076-144-063.pools.arcor-ip.net) has joined #vim
<sabgenton>    would still like to know
<bairui>    well, i don’t know. :) I don’t php. thankfully.
<sabgenton>    php works with syntaxcomplete#Complete
<sabgenton>    what language are you familiar with?
<sabgenton>    (s)
<bairui>    none – i keep them all at a respectable distance
<sabgenton>    do you vim for config files or note etc?
<bairui>    I Vim therefor I am.
<sabgenton>    sorry proobly a #vim-chat for this hehe
<sabgenton>    nice
<sabgenton>    I was considering trying to learn emacs again  then I reallised vim 7 has nice code completion
<bairui>    last I saw emacs was ~17 years ago…
<sabgenton>    so :cope is just like ^w ing to it but faster
<bairui>    well… :cope will open the quickfix window if it’s not already open
<sabgenton>    ok see
<bairui>    ^w is a prefix (in normal mode) to the windowing commands
<sabgenton>    the helpgrep opened for me this time
<bairui>    ok
<sabgenton>    whats the best place to go to understand exectly what I am puting in .vimrc for omincompletion
<bairui>    dunno. I don’t use omni. sorry.
<sabgenton>    ok
<sabgenton>    what about the file stuff you recommended
<bairui>    filetype plugin indent on   <–   make sure that’s in your ~/.vimrc
<sabgenton>    I have it as I showed except for the indent part
<sabgenton>    whats indent do?
<bairui>    add the indent – it’ll save the next question you have on #vim ;)   – good luck with the omni stuff, sabgenton – others here do omni. be persistent. I’m gonna hit the sack now.
<bairui>    it adds a lot of indentation support for filetypes. g’night all.
<sabgenton>    :) night
<rudi_s>    Hi. Is it possible to increase the files for which the last cursor position is remembered? It seems like only 10 files are remembered. I use the snippet from :help last-position-jump. Thanks.
<jamessan>    rudi_s: :help ‘viminfo   last-position-jump relies on being able to find a value for the ’0 mark for that file
<rudi_s>    jamessan: Thanks, but I found no option to increase the number of stored file marks. Or is it the ‘ option?
<jamessan>    rudi_s: exactly :)
<rudi_s>    jamessan: Ah, great. Thank you ;-)
<rudi_s>    Is it possible to just change that option without touching the other values? I tried viminfo+=’1000 but that doesn’t seem to work.
<jamessan>    rudi_s: that works fine.  it can’t resurrect file information for files that it already forgot, though
<rudi_s>    jamessan: Hm. But still have only 100 ‘>’ entries in “History of marks”. ‘viminfo’ is viminfo=’100,<50,s10,h,’1000 (set viminfo+=’1000)
<rudi_s>    *after opening more files of course.
<jamessan>    rudi_s: the viminfo file is only written when you exit vim (or call :wviminfo)
<rudi_s>    jamessan: I know. I visited a few new files, exited vim and when I reopen the files the position is remembered correctly, but I still have only 100 entries in “History of marks”.
<jamessan>    rudi_s: then open a file that isn’t already in that history :)
<xeon123>    in vim, what is considered the <leader> key?
<jamessan>    xeon123: :help <leader>
*    satyavvd_ is now known as satyavvd
<rudi_s>    jamessan: I did of course. It works fine when I use set viminfo=’1000,<50,s10,h; but not when I use set viminfo+=’1000.
<rudi_s>    After I switched bag to += it was truncated to 100 entries again.
<rudi_s>    *back
<jamessan>    rudi_s: huh, yeah, looks like it’s using the first value instead of the last.  so you’d have to use “set viminfo^=’1000″
<jamessan>    seems like a bug to me
<rudi_s>    jamessan: Thank you. ^= works fine.
<Zitter>    hi, can I ask an off topic question to an engish mothertongue?
<rane_>    huh?
<Zitter>    how is called in english person that is not driving the car, but he’s carried on?
<Zitter>    the driver and the … ?
<rane_>    passenger
<Zitter>    yes… too simple also for me! thanks rane_  :)
*    Zitter was thinking “Carried”
*    Ecco guesses Zitter speaks a latin language :)
<Zitter>    Ecco, :)
*    FernandoBasso speaks a useless language… :(
<Jerub>    FernandoBasso: lojban?
<FernandoBasso>    useless_language = pt_BR
<tos9>    Heh.
<banttu>    Hi,I have tried putting set autoindent and set smartindent in my .vimrc and each time I fire up vim those 2 options don’t take
<FernandoBasso>    I don’t have any of these in my 500-lines long ~/.vimrc. :/
<FernandoBasso>    http://img6.imageshack.us/img6/1664/vimrc.png
<FernandoBasso>    Lunch time…
<gkatsev>    vimgor: smartindent
<vimgor>    Don’t you mean stupidindent? In all seriousness, ‘smartindent’ is an obsolete option for C-like syntax. It has been replaced with ‘cindent’, and setting ‘cindent’ also overrides ‘smartindent’. Vim has indentation support for many languages out-of-the-box, and setting ‘smartindent’ (or ‘cindent’, for that matter) in your .vimrc might interfere with this. Use ‘filetype indent on’ and be happy.
<gkatsev>    vimgor: autoindent
<vimgor>    Dunno!
<jaggz–>    how do I do simple floating-point math, like 50/638
<jaggz–>    actually I end up needing it as an integer.. int(100*50/638)
<Dynetrekk>    jaggz–: the answer is 0, so hard-code it :)
<coot>    jaggz–: :echo 50.0/638
<jaggz–>    coot, thank you :0  and how do I insert it as text?
<jaggz–>    s/:0/:)/
<jaggz–>    come to think of it, I don’t know how to insert from the commandline.. except a file… or I guess :i is insert
<jaggz–>    Dynetrekk: it’s going to be used in a macro to do a bunch of calculations
<jaggz–>    tired of sending it to bc
<jaggz–>    how do I insert “hello” at the current cursor position from the commandline?
<jaggz–>    :someinsertcommand {expr}
<rippa>    :norm ihello<Esc>
<jaggz–>    thanks :)
<jaggz–>    except I really do need the {expr} result.. my hello example was insufficient :(
<jaggz–>    ah.. maybe :let @register_letter={expr}  then I can :norm “rp
<jaggz–>    assuming r is the register
<maqr>    how might i delete everything on a line that isn’t in quotes?
<jbrokc>    hey where’s the help on :<linenumber>
<coot>    jaggz–: sorry, I was off for a moment, you can redirect output to a register with :redir @a | echo 50.0/3 | redir END, or you can use :call append(line(“.”), string(50.0/3))
<coot>    jaggz–: :let @a=string(50.0/3) also will work
<jbrokc>    maqr: if the line’s where the cursor is then :s/^.\{-}\(“.\{-}”\).*$/\1/g
<jbrokc>    oops – s/^.\{-}\(“.\{-}”\)\+.*$/\1/g
<maqr>    jbrokc: there can be more than one thing in quotes on a line… but if i need a regex like that to do it, maybe i should just do it by hand :P
<maqr>    (also, you might be a wizard)
<jbrokc>    maqr: i dunno i’m just throwing shit at the wall
<maqr>    well it was damn close for something untested that looks like that :)
<jbrokc>    it works for one word in quote but i’m trying to figure out how to use \& to make a lookbehind work multiple times
<jbrokc>    i’ve never used it before though
<jbrokc>    maqr: so s/\&.\{-}\(“.\{-}”\)/\1/g works but it doesn’t clear after the quotes…
<jbrokc>    and yeah that’s wizardry
<jaggz–>    by hand or with macros you can use visual mode’s select tools
<jaggz–>    vi’
<Raimondi>    jaggz–: Ctrl-R =
<jaggz–>    or vi” I mean
<Raimondi>    jaggz–: That’s to insert the result of an expression on insert mode
<jaggz–>    raimond, reading i_^r … that’s so interesting!
<jbrokc>    Raimondi: you got anything on removing everything not between quotes? i must be crazy because i’m way off
<jaggz–>    I can’t get any floating point stuff though.. the 40.0/500 is not working .. 100*40/500 works for the task at hand.. but is there any way of doing floating-point manipulation?
<jaggz–>    oh.. everything NOT between quotes
<Raimondi>    jbrokc: That’d work if there only one quoted string
<jbrokc>    Raimondi: the \& attempt works for more except it doesn’t clear after the last one
<Raimondi>    jaggz–: 40.0/500 works here
<Phillemann>    I’m currently fixing my identation behavior. I’m using cindent. When I write the following http://codepad.org/cBvikpvh I get the problem described. Does anyone know which setting is responsible for that?
<jaggz–>    :echo 40.0/500 gives me 400
<jaggz–>    why can’t I let it go?  I got the task I needed to done
<Raimondi>    Phillemann: See :h cinoptions-values
<Phillemann>    Raimondi: I read the whole section and I can’t figure it out.
<Raimondi>    jaggz–: That’s because Vim thinks the dot is concatenating
<Raimondi>    jaggz–: Which version are you using?
<Raimondi>    Phillemann: I’m not a C user, let me see if I can find the option…
<Phillemann>    Raimondi: I currently have “se cino=g0,N-s,(s,p0,t0,)100,h0,u0″
<Phillemann>    So there’s little options using the shift width left.
<Raimondi>    Phillemann: No idea. If you don’t get any answers here try with the vim_use mailing list.
<Phillemann>    Raimondi: Ok, thanks anyway :)
<Raimondi>    np
*    abstrakt_ is now known as abstrakt
<jonasb>    hi all, below the file ends each line is displayed as a ~. what is that feature called? I’d prefer to have it all black, i.e. remove ~, is that possible?
<tos9>    You wouldn’t be able to tell the difference between empty lines and the file end
<tos9>    But looks like highlight NonText guifg=bg does it
<tappi>    think there’s a non highlight related way to do that as well
<tappi>    ie. a way to just disable it
<jamessan>    not that I know of, tappi
<jamessan>    jbrokc: it’s documented just under :help gg  no topic of its own
<jbrokc>    jamessan: thanks
<jbrokc>    maqr: i got it if you’re still interested – s/.\{-}\(“.\{-}”\).\{-}\|.\{-}$/\1/g
<jonasb>    tos9: that’s fine by me.. I’m trying vimroom (http://projects.mikewest.org/vimroom/)
<jonasb>    so would only apply this in a very specific context
<jonasb>    “highlight NonText guifg=bg” works to some extent but I have some other background color at the end of the file…
<tos9>    jonasb: Very cool. I’ve never considered looking for a vim plugin that does writeroom, but now that you’ve linked it I may try it myself.
<tos9>    jonasb: Yeah, you need to work out colorscheme stuff to get it the correct color, I’m not so great at that. Um..
<jonasb>    the way it does it is to create four windows to the
<jonasb>    s/to the/for the padding
<jonasb>    I’m using terminal mode, probably the reason
<tos9>    I’m a bit surprised that the plugin doesn’t help you with this
<jonasb>    me too
<jonasb>    highlight NonText ctermfg=bg   did the trick for me
<tos9>    Cool.
<jonasb>    it might be that it just isn’t tweaked for terminal… gui mode works quite well
<jonasb>    vimroom sets highlight NonText ctermfg=black, which turns into ctermfg=0, which is a gray color for me (256 colors). ctermfg=bg turns into ctermfg=16 which is black
*    sh1m is now known as sh1mmer
<Knodi>    Any know how I can move cursor after closing bracket or  quote, in insert mode?
<Knodi>    so if i’m typing (test) move from at the last t to out side of the bracket?
<Knodi>    without getting out of insert mode?
<Raimondi>    Knodi: Ctrl-O l  see :h i_Ctrl-O
<Knodi>    this Raimondi
<Knodi>    One more question % goes to opening brace first then it jumps to closing brace is there a key press for jumping cursor to ending brace first?
<jonasb>    tos9: https://github.com/mikewest/vimroom/pull/11
<coot>    Knodi: the normal behaviour of % is to jump first to the closing bracket, you can test it with :normal! %
*    yofel_ is now known as yofel
*    sh1m is now known as sh1mmer
<tos9>    jonasb: Nice
<asarch>    I start a multi-line comment block in C with /*, how can I set vim to automatically auto-indent and ADD another * to the new line?
<FernandoBasso>    I just hit <Enter> and it does that for me.
<FernandoBasso>     /*something…<Return> It works that way for me.
<FernandoBasso>    I don’t remember having any special setting for that.
<FernandoBasso>    asarch: Have you tried that?
<tappi>    asarch if you have at least filetype plugin on, and you’re editing a file where that makes sense, then vim should do that automatically
<tappi>    err, actually filetype plugin indent on
<Knodi>    Is there a command like % to jump right to the ending brace without having to press % twice?
<tappi>    f%
<tappi>    err
<tappi>    f) or f] or f} depending on what brace you have
<FernandoBasso>    It will work only if the the closing brace is on the same line, I think.
<Knodi>    because I want to do ctrl-o then command for jumping to ending brace
<tappi>    Knodi make a bind for pressing %% twice
<asarch>    FernandoBasso: Yes, I have
<Knodi>    kk thx tappi
<tappi>    or just press it twice
<tappi>    w/e :P
*    asarch tries with a blank new C source code file
<tappi>    asarch did you set that filetype plugin indent on in the .vimrc?
<acx0>    tappi, you can put it in there if you want to save it
<Knodi>    I would hate to do ctrl-o % twice
<Knodi>    seems alit to press so your right, i’m going to map it to a key
<tappi>    acx0 yes i know
<tappi>    that’s why i said it
<acx0>    tappi, oh my bad, i thought you were the one asking how to set it up
<asarch>    tappi: No, I didn’t. This my ~/.vimrc: http://paste.scsys.co.uk/148664
<tappi>    if you want that functionality then you need to add it
<tappi>    it’s that simple :P
<asarch>    How do you do that?
<asarch>    What is the name of that option?
<tappi>    :h filetype
<bassliner>    hmm. when i use vim in an xterm and i have “syn on” in my vimrc (i don’t have any other settings there at all) then SOME colours in vim will change after the first keypress in a session. with xfce4-terminal, this does not happen. any hint why?
<FernandoBasso>    asarch: If you are new to vim, the help might seem baffling.
<FernandoBasso>    I mean, the vim’s help.
<FernandoBasso>    asarch: I’d advise you to place that line “filetype plugin indent on” somewhere at the beginning of ~/.vimrc.
*    FernandoBasso is new to vim himself.
<iocor>    how do I alias :NERDTree to :nt
<rane_>    alias it to <leader>nt rather
<iocor>    new to vim
<asarch>    Thank you FernandoBasso
<asarch>    Thank you very much :-)
<FernandoBasso>    iocor: :nmap <Leader>nt :NERDTree<Return>
<iocor>    FernandoBasso: does that go in my vimrc?
<FernandoBasso>    iocor: Just that in vimrc you don’t need the :
<iocor>    the leading :?
<FernandoBasso>    iocor: Yes.
<FernandoBasso>    That is only needed in vim’s command line itself, or better, on switch to vim’s command line mode.
<bassliner>    interesting, even happens with a fresh user, on different systems…
<iocor>    that’s not working
<FernandoBasso>    iocor: What is not working?
<FernandoBasso>    Ah, to ‘run’ the ‘alias’, you have to restart vim, and type \nt in normal mode.
<iocor>    I typed :nt(enter) and it said “:nmap <Leader>nt :NERDTree<Return>”not an editor command nt”
<FernandoBasso>     nmap <Leader>nt<Return> in ~/.vimrc. Reestart vim and hit \nt
<iocor>    still saying command not found
<iocor>    nmap <Leader>nt<Return> :NERDTree<Return> that’s the line I’ve got
<FernandoBasso>    Does :NERDTree work by itself?
<iocor>    yup
<iocor>    it’s still saying “not an editor command”
<rane_>    remove space before :
<iocor>    http://sprunge.us/ZWAK
<iocor>    that’s my vimrc
<tos9>    iocor: You’re typing it in :
<iocor>    ok
<FernandoBasso>    iocor: Are you typing :nt or \nt ?
<iocor>    I’m typing :nt\n
<iocor>    that’s what I want to type to get nerdtree
<FernandoBasso>    No, just \nt
<iocor>    uh
<iocor>    by \n
<iocor>    I mean enter key
<iocor>    but I want to type :nt and get nerdtree
<FernandoBasso>     nmap nt :NERDTree<Return> then.
<iocor>    it’s still saying “not an editor command”
<bairui>    iocor: you can’t (easily) create : commands that start with lower-case letters.
<bairui>    so, FernandoBasso and tos9 are showing you an alternative using a Normal Mode command instead
<macrobat>    try a cabbr. like       :cabbr nt NERDTree
<bairui>    yes, that is the path to lower-case : commands
<bairui>    but it is fraught with danger
<iocor>    hat one works
<macrobat>    stay safe
<FernandoBasso>    Just for testing, :nmap :nt :help<Return> worked here.
<bairui>    it will, FernandoBasso – but that’s a normal map – and now you’ve clouded your : entry into Ex Mode
<FernandoBasso>    bairui: I agree. That is why I was advising to use <Leader>nt instead.
<bairui>    right, FernandoBasso, but iocor wanted to access this through Ex mode
<bairui>    at least – that’s how he *though* he had to, or wanted to
<bairui>    s/though/thought/
<Knodi>    How can I man vsplit windows scroll, lets say I set wmm=80 but my gvim window size is 100. So when I switch focus it v-scrolls to show full 80 colums on the next vsplit window?
<macrobat>    :cabbr NT NERDTree is more safe. I don’t have an idea on how to nerf it further
<Knodi>    how can i scroll*
<Knodi>    so v scrolling
<naryl>    Greetings! What data structure does vim use internally to store text?
<Raimondi>    Knodi: :h scrolling
<bairui>    good morning, Raimondi :)
<Raimondi>    Good morning, bairui :)
<macrobat>    what is wmm? :D
<Knodi>    i mean wmw=80
<Knodi>    damn typos
<jbrokc>    so i HTML in VIM does one thing that annoys me terribly and that’s any anchor tag (<a>) that continues on a new line has it’s underline continued across all the whitespace instead of on the word itself
<Jerub>    jbrokc: that’s annoyed me too in the past.
<jbrokc>    taking a peek at syntax/html.vim it looks something like start=”<a\>\_[^>]*\<href\>” end=”</a>”me=e-4 but dude… that’s way beyond me.
<jbrokc>    i’m offering unconditional love and affection to the person who solves this problem
<walt>    jbrokc: vim syntax files are hell
<walt>    :(
<jbrokc>    walt: i know – i’m thinking of doing some weird skip= pattern but I don’t know what the hell me=e-4 at the end of that thing means. or \_
<walt>    I once tried writing one from scratch
<walt>    I gave up
<kadoban>    i don’t think that’s what skip is for actually, i was just looking at that…it says it’s something about where not to look for the end
<jbrokc>    walt: i hack on vim-taskpaper’s syntax file all the time to learn more about regex’s and tricky shit like \z
<bairui>    jbrokc: :help /\_ – it’s for including newlines in searches    and iirc, me = match-end – and this is saying, consider the match end to be 4 from the end… but I’ll have to hit the :help to confirm that.
<bairui>    yep – :help :syn-pattern-offset
<bairui>    hmm… which shouldn’t have a : designator in the help files, jamessan -   :help :syn-pattern-offset   – yeah?
<jbrokc>    Jerub: if you comment out lines 248 and 254 of :e $VIMRUNTIME/syntax/html.vim  then it’s just gone.. dunno
<jbrokc>    an underline would be nice but the continuing onto new lines pisses me off too much
<kadoban>    maybe you could change it to another highlighting style, like bold, that wouldn’t look like ass on long whitespace like that? not ideal, but…
<bairui>    jbrokc: an alternative approach:
<bairui>    highlight link htmlLink NONE
<bairui>    highlight link htmlLink                    HtmlItalic
<bairui>    ah, kadoban, same idea
<jbrokc>    yeah – <h> tags have bold already
<jbrokc>    huh gui=italic doesn’t work
<jbrokc>    ah nevermind – can’t do it in a link
<jbrokc>    so you guys – sublime text 2 is like a really hot editor right now. I just don’t get why. is there some features that new editors come out with that is really awesome and not quite available in vim nowadays?
<AvianFlu>    jbrokc, I’d say the mouse :D
<AvianFlu>    in the modern-gui sense, I mean
<walt>    isn’t sublime aimed only at python
<walt>    ?
<AvianFlu>    click n’ drag, no learning command line or key combinations
<AvianFlu>    no, it’s general use
<AvianFlu>    it has the usual collection of “most common languages”
<AvianFlu>    people are scared of the CLI, bottom line
<AvianFlu>    a lot of the time, anyway
<walt>    I tried Sublime a year ago
<walt>    didn’t like it at all
<FernandoBasso>    There is no life after vim.
<FernandoBasso>    The command like was what first hocked me to linux, and irssi, and vim. I felt like a hacker the first time I learned some commands back in ubuntu 6.06. :D
<FernandoBasso>    s/command like/command line/
<FernandoBasso>    Damn typos². s/hocked/hooked/
<sjl>    I’m confused.  :help statusline says that it’s global and local to windows, but when I :setlocal statusline=foo in a window and then edit a different file in that window, it uses the global value
<sjl>    It seems like it’s behaving as local to a buffer, not a window
<Araxia>    sure looks like a documentation bug to me.
*    sorin is now known as Guest18706
*    newbie is now known as Guest55643
<tsolox>    how do i search for something like, ‘myvar =’   because I want to find the places wherein myvar gets assigned to. There could be varying whitespaces…
<strull>    try /myvar *=
*    okayzed is now known as okay
<bairui>    or   /myvar.*=   if you have situations like   myvar += 1   etc
<strull>    then you better go for /myvar\>.*=
<bairui>    or even  /\<myvar\>.*=
<strull>    but he’s away anyway
*    strull is fighting with qemu right now
<bairui>    queer emus?
<bairui>    oh – the virtualisation stuff
<strull>    right. Nice and terrible at the same time
<bairui>    i’ve only ever dabbled. nothing serious. i think it was to proof a Puppy build.
<strull>    dabbled ?
<bairui>    dabbled = played with (a little)
<strull>    aah, ok. learned smth new :)
<jbrokc>    easier way to expand the <cword> in a nnoremap than :Cmd <C-R>=expand(“<cword”)<CR><CR>  ?
<jbrokc>    doesn’t look like it :(
<strull>    try <c-r><c-w>
<bairui>    you might be able to use   <c-r><c-w>   in some places
<jbrokc>    thanks
<bairui>    np
<strull>    have fun!
*    invariable is now known as variable
<jamessan>    bairui: I think :syn-pattern-offset should have the : since it’s documenting :syn’s pattern offset stuf
<bairui>    ah. ok… it was a tad confusing (before coffee) because it wasn’t a full command in itself. But I accept your reasoning now (well after coffee :) )
*    Guest55643 is now known as Daditos
<tshauck>    hey, I’m trying to use vim to edit tex files, but it seems to take a while to detect that it’s a .tex file (I don’t get tab completion or syntax highlighting I normally do) How can I make it detect .tex files faster
<medgno>    tshauck: you could do something like au BufRead,BufNewFile *.tex setfiletype tex
<medgno>    in your vimrc
<tshauck>    cool thanks, I’ll give that a try
<jamessan>    that’s not going to help. there’s already filetype detection for .tex files.  they just default to the plaintex filetype unless there’s something to indicate it should be tex.  putting “let g:tex_flavor=’latex’” is probably going to be better
<jbrokc>    if you want to bundle an autocommand for a filetype-plugin, where would it go? syntax/ after/plugin or ftplugin/ and would you just write it as an autocommand not in an augroup or augroup still applies?
<jbrokc>    say i’m setting the omnifunc for a certain filetype
<jamessan>    jbrokc: ‘omnifunc’ is typically set in the ftplugin
<jbrokc>    jamessan: thanks – does it have to be setlocal?
<jamessan>    always recommended to use setlocal for buffer-local settings :)
<jamessan>    s/buffer-local/non-global/
<jbrokc>    jamessan: thanks. hey i learned about the :s modifier this weekend. that’s some crazy shit
<bigfeng12>    test
<f3xius>    is there something similar to csupport in vim for assembly?
<f3xius>    specifically x86
*    okay is now known as okayzed
<sig->    is it a vim feature that I’m left with bunch of files~ after closing vim
<sig->    or is it a MacVim feature?
<sig->    I’d like to get the ~ files deleted after clean exit
<bairui>    sig-: :help ‘backup
<sig->    thanks! That’s what you get for copying other peoples’ vimrc  (:
<bairui>    heh… copying other people’s vimrc files is an abomination unto the vimiverse – almost as unholy as navigating in insert mode:
<bairui>    vimgor kittens
<vimgor>    It has been said that kittens is http://bairuidahu.deviantart.com/art/Vim-and-Vigor-2-Insert-Nav-260446820, bairui
<gkatsev>    lol, haven’t seen that one before.
<tos9>    argh I am getting tired of iTerm2′s poor URL support
<f3xius>    how could I use a use a syntax file from my home directory?
<f3xius>    ie I don’t have root
<gkatsev>    something like ~/.vim/ftplugin/python.vim
<gkatsev>    check the help
<f3xius>    hmm actually I guess I should have just tried it I created a ./vim/syntax put the syntax file in there and did a set syntax=
<f3xius>    and that appeared to work
<Raimondi>    f3xius: Do you have a ~/.vim folder and a ~/.vimrc file?
<f3xius>    err I meant .vim/syntax
<f3xius>    no I do
<f3xius>    I just thought that load wouldn’t see my local syntax files
<Raimondi>    ok
<f3xius>    since I thought it only looked in the installation directory
<gkatsev>    nope, it looks in your home folder
<gkatsev>    also, if your syntax file isn’t working, put it in ~/.vim/after
*    okayzed is now known as okay
*    okay is now known as okayzed
<jagguli>    hi whats the best way to search in multiple buffers, :bufdo /term/ dont seem to be workin
<Raimondi>    jagguli: What are you trying to do?
*    miguet is now known as robotek`
*    robotek` is now known as group
*    group is now known as miguet
<woldrich>    search in multiple buffers!
<patcito>    hi
<patcito>    is there a way to save a file in a directory that doesn’t exist and have vim create the directory automatically?
<bairui>    there are solutions to this on the wiki page – wikia.vim
<woldrich>    speaking of which. wikia is horrible. what’s the reasoning of using it instead of… something friendlier like ikiwiki?
<jorrit>    Hi
<bairui>    wolly: no idea… I almost never use the wikia site – I merely redirect people there. Think of me as the Friendly Hairy Vim Fairy: http://bairuidahu.deviantart.com/art/The-Hairy-Vim-Fairy-262662025
<Raimondi>    hahahahaha
<Raimondi>    I’m still laughing, you’re going to kill me one of these days, bairui :D
<bairui>    :D
*    Axioplase is now known as Axioplase_
<coot>    Helo, how to make a map which uses a register, like y, where you first specify the register or not (I want to have my y command in some cases)
<Raimondi>    coot: :h v:register
<coot>    Raimondi: that’s what I forgot about :) Thanks!
<Raimondi>    np
<dorkmafia>    I know i asked this recently but I totally forgot again… how do you go back to the position you started searching
*    bairui_ is now known as bairui
<bairui>    “
<dorkmafia>    what’s ` do exactly? there was another one someone told me
<bairui>    :help `
<bairui>    and then   :help “
<dorkmafia>    that seems to cycle through my searches
<dorkmafia>    i want to go back to where my cursor was b4 i excecuted /foo
<bairui>    “ will jump back and forth between your two last jumps
<bairui>    well, if you have inc-search enabled and you’re still in the search, just press <esc>
<bairui>    if you have executed the search, press “
<dorkmafia>    hmm
<dorkmafia>    it was something else
<dorkmafia>    ^o
<dorkmafia>    that’s what it was!
<dorkmafia>    :)
<dorkmafia>    thanks  though being able to cycle is important too
<bairui>    there you go – you *could* remember after all :)
<dorkmafia>    heh
<bairui>    well, ^o/^i are much more about cycling than “
<dorkmafia>    one of the brain cells came back from the dead
<Raimondi>    zombie neurons?
*    avsej_ is now known as avsej
<bairui>    you must be reaching zombie mass by now, Raimondi ;) Late there now, boyo.
<Raimondi>    Yep, I was just typing my good night :)
<bairui>    glad you got to see the Hairy Vim Fairy before you slept – wonder what dreams (nightmares?!) that’ll bring? ;)
<Raimondi>    lol I hope it doesn’t visit me yet :p
<bairui>    I created him ‘cos I was thinking of changing my Hikaru No Vim idea into more of a dream-state visit from the Vim Fairy – a la the Number Devil
<dorkmafia>    haha
<Raimondi>    Got to be carefull about wishing now
<bairui>    haha
<bairui>    all sorts of wrong might happen at the end of *that* wand… oO
<Raimondi>    hahhahaha
<dorkmafia>    brrrrrrrrrrrrrrrrrrraaaaaaaaaaains
<Raimondi>    Good night!
<bairui>    g’night, mate!
<dorkmafia>    :P
<dorkmafia>    bairui what cpu lang do you mostly use?
<bairui>    what is a cpu lang?
<dorkmafia>    computer language
<woldrich>    bairui, yeah, try editing something in the wiki. furthermore, wikia is proprietary stuff
<dorkmafia>    do you mostly write in c?
<bairui>    oh, dorkmafia. master of none; dabbler of many.
<bairui>    I gave up C about 10 years ago (thankfully)
<bairui>    I mostly play with VimL, Ruby and newLisp these days
<bairui>    but I’ll give anything a bit of a tickle – I’m a total whore that way
<dorkmafia>    haha
<bairui>    wolly: i don’t think I’ve ever edited the wikia
<dorkmafia>    tickle the pickle
<Raimondi>    before I forget, asciidoc plugins I should know about?
<woldrich>    bairui, I have, mpd.wikia.com
<woldrich>    it still gives me nightmares
<bairui>    asciidoc is pretty sturdy as she is… Have a look at some of the available themes, though. I like the Flask theme…
<Raimondi>    k
<bairui>    np
<Raimondi>    night!
<bairui>    oh – and we’re using pygments
<dorkmafia>    are there macros in vim?
<bairui>    g’night
<bairui>    yes
<dorkmafia>    k lemme see the help
<bairui>    dorkmafia: :help q
<woldrich>    I’m afraid I can’t let you do that
<bairui>    having a 2001 episode, wolly?
<woldrich>    :-)
<bairui>    walkies time!
<bairui>    and you thought I was gonna talk about food again, didn’t ya, wolly! :p
<woldrich>    hmm… I think *I* need some food for a change
<Crusnik01>    Hi! I have a number of lines that I want to delete in a file. I can easily find them using :%s, but I can’t seem to find a way to delete an entire line. Any tips?
<woldrich>    Crusnik01, % is the whole buffer
<Crusnik01>    woldrich: Yes; I know. I want to search the entire file for the lines I want to delete.
<woldrich>    are you missing the /g flag?
<Crusnik01>    woldrich: Let me correct that: The lines contain certain words, but the rest is different. “Subnet Mask . . <then some number>”
<Crusnik01>    I want to delete all lines that contain “Subnet Mask”
<woldrich>    ah
<woldrich>    :g/Subnet Mask/d
<Crusnik01>    woldrich: Sweeeet, thanks! :D
<woldrich>    :g is a bit scary at first, but she’ll grow on you and you’ll eventually learn to love her
<ouah>    hi
<ouah>    in vimdiff what is the opposite command of zR (zc only close fold under the cursos, not all) ?
<ouah>    cursor
<ouah>    it is zM, I might have searched a little bit more…
<platzhirsch>    How can I turn on, that the buffered files are deleted after closing vim?
<platzhirsch>    found it, nevermind
<depaulis>    Hi, I am wondering if vimdiff can be used as merge tool in ClearCase. 4 windows (foundation version, rebase version, my version, and the final version)?
<spiiph>    depaulis, Vim does three way diff at most, iirc.
<stianhj>    you can do vimdiff file1 file2 file3 file4
<dhruvasagar>    Hi, can someone explain about ‘switchbuf’ ?
<dhruvasagar>    stianhj: you can!?
<depaulis>    spiiph: the final version shall not actually be included in the diff itself, that one is the final result window. But I guess it is more than just diff the files, the need for automerge all non-conflicts needs to be done.
<stianhj>    don’t know how it works though.. but :he vimdiff
<depaulis>    stianhj: Mmm.. I will take a look if the ccase plugin have any support for this. Thanks
<spiiph>    depaulis, most VCS tools have a setting to use an external diff tool. If ClearCase has such a setting, it should be possible
<spiiph>    depaulis, http://stackoverflow.com/questions/375398/any-way-to-use-a-custom-diff-tool-with-cleartool-clearcase
<depaulis>    spiiph: thanks I take a look
*    nowox_ is now known as nowox
<depaulis>    I did not find anything that I wanted just another post in a forum that wanted the same feature “Show 3 files at the top, and show the result at the bottom – and some quick way to choose (in the result) which version should be inserted (yours,base,theirs).” the ccase plugin does not seem to support this.
<Number5>    Hello guys, I started to use SnipMate for my C codings. It looks great, except that it goes wrong when an item is selected (after typing ‘for’) and I press ‘p’ to write printf for example. It seems ‘p’ is used as paste I assume. Anyone recognize the problem?
<spiiph>    Sounds like you’re still in Normal mode when starting to type text?
<Number5>    So to work around this issue, I type ‘i’ to switch to insert mode
<Number5>    Well, that’s what SnipMate is doing, cause when typing ‘for’ I do that in insert mode. After hitting tab, SnipMate comes into action.
<spiiph>    Yes
<spiiph>    It sounds odd thCreate an SVN tagat SnipMate should cause you to escape insert mode
<Number5>    spiiph, do you use SnipMate too and do you recognise this issue?
<spiiph>    I use SnipMate occasionally, and no.
<Number5>    ooh ok
<spiiph>    Sorry about the odd paste in the previous statement, btw.
<Number5>    spiiph, np at all ;)
<jamessan>    a little subliminal messaging never hurt anyone ;)
<spiiph>    haha
<spiiph>    Very true
*    bairui_ is now known as bairui
<xvilka>    hi! i’m working on vim-like console hex-editor. Can you help me with designing some commands syntax?
<xvilka>    like :block selection, :and, :x or etc
<xvilka>    e.g. right now i’m using :block <num> <start> <end> or :block <num> <start> +<size>
<xvilka>    and for :and <num> <mask>
<xvilka>    where <num> block number – <mask> – just byte, it AND-ing each byte from block with <mask>
<xvilka>    how-to design syntax for blocks logic operations?
<og01>    hey there, I get a message from one of my plugins saying, “Taglist: Exuberant ctags (http://ctags.sf.net) not found in PATH. Plugin is not loaded.” can i supress this warning?
<og01>    my .vim* is copied between hosts, some might have ctags some wont, I dont want the warning on the machines that dont
<og01>    nm i edited the plugin
<spiiph>    og01, surely the plugin has a setting g:taglist_loaded or some such, to prevent it from loading at all
*    X-Scale is now known as Guest42831
<og01>    there is a loaded_taglist variable, doesnt look like it actually supresse the loading of the plugin
<MarcWeber>    og01: Ask the author to use autoload – then loading will be faster.
<MarcWeber>    og01: Or use vim-addon-manager and activete it “as-needed” using :ActivateAddon taglist
<og01>    the source does mention autoload
<MarcWeber>    og01: How many lines do the plugin/*.vim files have?
<og01>    this plugin has 4546
<MarcWeber>    og01: THat’s why its slowe on each start.
<og01>    didnt say anything about it being slow…
<og01>    just wanted to supress a warning
*    bairui_ is now known as bairui
<MarcWeber>    og01: Which one?
<MarcWeber>    Loading 4000 lines usually is slow on startup.
<og01>    waring is for taglist plugin when ctags isnt present
<MarcWeber>    og01: which operating system are you using?
<MarcWeber>    Without ctags you can’t use the plugin anyway, can you?
<og01>    linux based distros varying
<og01>    MarcWeber: this is correct
<og01>    MarcWeber: I use source control on my home config files so they get maintained across boxes
<MarcWeber>    So do you agree that the fix is either uninstalling the plugin, fixing the warning (eg by introducing a “don’t tell me again” glbal var) or by installing ctags?
<MarcWeber>    Or put the plugin/*.vim file somewhere else and source it in your .vimrc manually if ctags can be found in PATH only
<MarcWeber>    And exactly that last thing is easiest using VAM.
<og01>    pretty much, i dont know much about vim plugin design, my current solution is i edited the plugin and removed the warning
<og01>    what is VAM?
<xlinkz0>    vim comes with python omni completion by default , right?
<spiiph>    xlinkz0, yes
<xlinkz0>    do i have to enable it or smth?
<xlinkz0>    how exactly do i make it pop-up?
<og01>    MarcWeber: I was either looking for a method of conditionally loading a plugin, or otherwise some other sort of warning supression
<spiiph>    xlinkz0, :filetype plugin indent on
<spiiph>    <C-x><C-o>
<MarcWeber>    og01: I’m going to show you both if you want.
<og01>    MarcWeber: the Conditional loading of plugins seems like the most likely best solution
<spiiph>    og01, I don’t have the tag list source here, but if it has a loaded-variable, setting that in your .vimrc should prevent the plugin from loading.
<MarcWeber>    spiiph, og01 loaded_taglist
<MarcWeber>    if !executable(‘ctags’) | let g:loaded_taglist=1 | endif
<spiiph>    like that
<xlinkz0>    spiiph, thank you
*    X-Scale` is now known as X-Scale
<xvilka>    so, any ideas on my question?
<spiiph>    xvilka, not off the top of my head
<gurifisu>    how do you do page down page up without leaving the homerow?
<gurifisu>    just pressing down j takes too long
<bairui>    ctrl-f / ctrl-b
<Phillemann>    I’ve apparently got an error in my vim configuration. When I open a buffer, a message pops up for, say, 2 seconds, then disappears. I can’t read it that fast. Is there any buffer/file this output is saved to?
<og01>    Phillemann: try hitting C-q when the message pops up
<sqz>    Everybody! We just released our first beta vimplugin: mappingmanager.vim !
<sqz>    demo:  http://playterm.org/r/vim-mappingmanager-plugin-1318246417
<sqz>    tryit: http://www.vim.org/scripts/script.php?script_id=3768
<Phillemann>    Ah, good idea…
<og01>    Phillemann: bah thats C-s, C-q to resume
*    sqz and gloomy made mappingmanager.vim to turn our vim into a console cruiseship ;)
<Phillemann>    og01: Hehe, I got it nevertheless ;)
<gloomy_>    sqz: ;)
<dc5ala>    I’m following a vim latex tutorial and at one point it says: “In normal mode, press \rf. This will fold up the entire file” Any idea what that \r means?
<sqz>    I wonder if there are other places where we can promote our plugin
<sqz>    dc5ala: try :map
<Phillemann>    Crap: “Error detected while processing BufLeave Auto commands for “<buffer=2>”:” – that’s not very helpful.
<og01>    sqz: it controls only F keys?
<dc5ala>    sqz, thanks, i found a ,rf there and no \rf :)
<sqz>    og01: well thats the default behaviour yes..but in every preset you can basically define anything you want
<sqz>    dc5ala: no probs..glad I could help
<og01>    sqz: maybe it could help me get over my aversion to using the F keys
<sqz>    og01: the idea is that you can switch between mapping presets easily
<sqz>    og01: haha lol
<og01>    sqz: The F keys just seem so far away I generally speaking i hav no idea what they do
<og01>    I’ll give it a try
<og01>    today seems like a day of new plugins for me
<ccxCZ>    I have F5 for ipython and F[678] for pylint. I have others bound, but can’t remember them :]
<gloomy_>    ccxCZ: if you ever have too less F keys, use mappingmanager ;)
<spiiph>    Phillemann, instead of relying on your ability to stop terminal flow at the right moment, you could try :messages
<alansaul>    hey vimmers
<Rockdtben>    hi
<swimmer>    sqz: any chance to see your .vimrc? ;-)
<swimmer>    sqz: and of course nice plugin! :)
<xlinkz0>    is it possible to go to the X char in the document? like xgg goes to line x
<xlinkz0>    i’d like to go to char x
<ccxCZ>    x|
<ccxCZ>    oh, that’s column, dunno about char
<xlinkz0>    :(
<shirt>    after i yank a block, how can i paste it so it inserts lines?
<dindinx>    xlinkz0: go
<xlinkz0>    dindinx, life saver :p
<ashleyw>    Hey, if I was wanting to do CTRL-W =, would that be CTRL+W+=, or CTRL+W, lift, then press =?
<Zathrus>    yes
*    Zathrus wonders why simple experimentation didn’t show this
<ashleyw>    And is CTRL+W the same as CTRL+w?
<Zathrus>    yes, and again — please try.
<ashleyw>    Awesome, no idea what I was doing before, it seemed to work randomly
<Number5>    sqz, that’s really cool :D
<sqz>    Number5: thnx :)
<sqz>    swimmer: well my vimrc has nothing to with the plugin, but the mapping-file from the video is included in the tarball as an example
<sqz>    so basically you put mappingmanager.vim in /plugins, and then you can place mappings.vim in /etc/vim/. or ~/.vim/. or some/dir/. (you can use multiple)
<sqz>    the only ‘other’ plugin you in the vid is NERDTree (its a file-explorer like you also see in eclipse and such)
<swimmer>    sqz: I was more interested in your popup- and completion-config tbh ;-)
<sqz>    swimmer: ah! what you want is..
<sqz>    acp.vim
<sqz>    it is..in my experience..the (fastest) autocompletion tool which fits my needs
<swimmer>    I see – I’ll look it up … thanks!
<sqz>    but you’ll need vim7.2 or greater
<sqz>    at your service
<swimmer>    jejeje – dank je wel ;-)
<gloomy_>    swimmer: the popup thing is nerdtree
<sqz>    swimmer: wtf! you speak dutch?
<swimmer>    sqz: yep :)
<ksk>    hello vimppl :)
<sqz>    hi ksk
<ksk>    im using vimdiff, got the problem it does not display the whole documents. just some “+– 92 lines:” information – how to expand it? first time I get into this…
<sqz>    swimmer: geen dank, graag gedaan! (btw. when were you in holland?)
<sqz>    ksk: it means there are not changes if you see +—–
<ksk>    ah okay :) fine then
<swimmer>    sqz: I’m living there! ;-)
<ksk>    thanks sqz
<sqz>    ksk: vimdiff highlights ‘differences’ as a pink selection of text..the other surrounding parts are usually folded (because they are not important)..HOWEVER..
<pickels>    I have the following: map <leader>c :!coffee -p %<cr> coffee -p will compile coffeescript to javascript and print it to stout. I was wondering if I could open that output in vim again?
<sqz>    you can expand them by using the arrow (left or right) keys
<sqz>    pickels: yes
<sqz>    pickels: use .!coffee -p etc..
<sqz>    pickels: or type :h .! for help
<pickels>    sqz, thanks going to read up on that
<pickels>    is . the name of the command? Says it cant find help for .!
<sqz>    swimmer: nice, normally I live in Utrecht (originally in the North near Groningen), but nowadays I live in Budapest/Hungary
<sqz>    pickels: oh..then maybe try :h !
<pickels>    ah okay I’ll check that
<sqz>    in any case.. adding a ‘.’ before the ! will make vim put the output into the current buffer
<pickels>    ah
<sqz>    so you could try something like :sp output | .!coffeescript (..etc..)
<sqz>    it will open a new window and after that (|) it will do the trick you want
<sqz>    pickels: these last 3 sentences were for you btw
<pickels>    ah that’s excellent, dank u wel!
<cafaro>    Is is possible to let surround omit spaces when adding a surround delimiter? In: <foo>b^ar</foo> (^ denotes caret position), I do ysit(, and it becomes: <foo>( bar )</foo>, but I’d like <foo>(bar)</foo>
*    helly1 is now known as helly
*    satyavvd_ is now known as satyavvd
<fgro>    hi. trying to read an RTF document, however I see a lot of “formatting” instructions like “{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540…” I read RTF was supported by “standard” vim. Maybe I missed a special flag while compiling on gentoo?
<fgro>    and yes set filtype=rft …
<fgro>    *filetype
*    X-Scale is now known as Guest76393
<rudi_s>    fgro: Vim is a text editor, RTF is not plain text but contains formatting instructions which is exactly what you see.
<fgro>    rudi_s: ok. well how can i transform this to a more “human” friendly output?
<ccxCZ>    you can convert it to plain text using some word processor, eg. abiword or libreoffice
<ccxCZ>    abiword -t txt -o output.txt input.rtf migth do what you want
<fgro>    ccxCZ: cheers
<Number5>    I have a question related to NERD_commenter. Is it possible to add a comment as a document way, like documenting a function or adding info about author/license of the source?
<rudi_s>    fgro: But you’ll lose some information in the process.
<Number5>    This documentation should be generated from a template if possible.
<rudi_s>    If you want to retain most formats you might want to convert it to latex for example.
<rudi_s>    (Open/LibreOffice can do that.)
*    Guest76393 is now known as X-Scale
<fgro>    rudi_s: i will try with abiword for now
<fgro>    rudi_s: don’t want to install libreoffice-bin right now. too large. slow i-net connection.
<rudi_s>    Sure. If you want to try it some time, you also need the writer2latex plugin.
<fgro>    ccxCZ: abiword solution was sufficient. cheers
<iamjarvo>    hi guys. so if you take a look at this screenshot http://cl.ly/0C2T3Y3z1q3e0v3y1L2F . I have my cursor at the beginning of line 4. i was wondering whats the easiest way of making a new line and going to it
<paradigm>    iamjarvo: o
<paradigm>    or maybe O
<paradigm>    I’m not completely sure what you want
<iamjarvo>    o workd
<paradigm>    excellent
<iamjarvo>    thanks alot
<paradigm>    happy to help
*    X-Scale is now known as Guest55289
*    Guest55289 is now known as X-Scale
*    davve is now known as davv3
<og01>    which :he do i want to look at for a description of the difference between let g:something, let a:something let s:something etc.
<strull>    og01: :he internal-variables
<og01>    strull: thanks perfect
*    pumaman is now known as hashbaz
<jaggz1>    how do you do a :s/// with a multiline pattern?  (e.g: to delete “foo\n  bar” with:  s/^foo\_s*bar$//)
<jaggz1>    nevermind, it works.  I just had a bad character in mine.
<kai>    hi folks
<paradigm>    howdy kai
<kai>    I’m looking for a search/replace regex that’ll add a space after all commas between two non-space characters.. but only if they’re not inside a string
<kai>    I’ve got the first part worked out (
<kai>    s/\(\S\),\(\S\)/\1, \2/
<kai>    no idea how to do the second part
<kai>    any hints?
<paradigm>    kai: I’m not so hot with regex, but if no one else can help in here you can always ask in #regex
<sqz>    kai: best place is join #regex OR follow the rules of #regex
<sqz>    1) post your input string
<sqz>    2) post desired output
<sqz>    3) post your attempt
<kai>    ok, hang on :)
<sqz>    sorry if it sounds rude, but these rules make sense if you’re dealing with regexes
<kai>    nah, that’s fine
<abstrakt>    kai, regex isn’t always good for everything
<sqz>    wil je het horen?…
<sqz>    oops wrong window :)
<abstrakt>    kai, IMO you’d probably be better off doing it with a procedural language
<kai>    abstrakt: I’m trying to edit a python file that is a horrid mess
<abstrakt>    kai, either that or, you probably need to learn some of the more advanced regex features like lookarounds
<abstrakt>    kai, ahh, why not just use polystyle
<abstrakt>    or something similar, gnu indent maybe
<kai>    unfortunately it’s a parser, so I can’t just run my regex, that breaks the parser part
<abstrakt>    ?
<abstrakt>    kai, wait, um… what is a parser?
<abstrakt>    if your regex(es) are proper they should not break anything
<abstrakt>    well i know what a “parser is”
<abstrakt>    kai, i mean, how does your parser break, i don’t get it
<kai>    http://paste.pocoo.org/show/490505/
<kai>    so that’s my example
<kai>    the regex I’ve got changes the “,” string to “, ” as well, which I don’t want to happen
<abstrakt>    yes i see
<abstrakt>    kai, I would suggest some kind of macro/regex combination
<abstrakt>    kai, I’m sure you can probably get it figured out with macros+g///+s/// respectively
<abstrakt>    kai, i’m 90% sure that you either can’t do what you want with regex, or it will be rediculously long and complex to do what you want with regex
<abstrakt>    s/with regex/with regex only/g
<abstrakt>    kai, how long is your parser? how many lines do you have?
<abstrakt>    kai, you’d probably be better off just doing it by hand, or partially by hand – might get it done faster
<abstrakt>    just find a good regex for each single line only and then just :<C-p> on each line till you select the regex you need, run it, go to the next line
<abstrakt>    kai, and you can probably use / to get to the proper next line, and for that matter, you can probably automate the entire process of “next line, run regex, next line, run regex” with a macro
<abstrakt>    kai, or maybe you could select lines with g/ instead of /
<kai>    abstrakt: it’s about 8k lines of code total
<abstrakt>    kai, or maybe you could write a macro instead of a regex, and use g/ or / to find next line and then run the macro
<abstrakt>    and then write a macro to “find next, run macro, find next, run macro”
<kai>    so far I’ve just run with s/…/…/gc and manually made sure the correct replacements happen
<tshauck>    hey guys, is there a way to insert a blank line between each line?
<kai>    but I’m through 452 substitutions on 189 lines and around line 1400
<kai>    which is why I wonder if there’s a better way to do this :)
<abstrakt>    kai, um… there is
<abstrakt>    kai, i’ve just given you like 3 different combinations of options that you should go try
<abstrakt>    kai, did you not hear me? are you ignoring me? do you just not believe me?
<consumerism>    say i have function(one, ‘two’) – what’s the quickest way to switch the two parameters so i end up with function(‘two’, one) ?
<abstrakt>    consumerism, backreferences
<consumerism>    abstrakt: can you be a little more verbose? i’m only familiar with backreferences in a search and replace context
<Raimondi>    consumerism: :h \1
<abstrakt>    consumerism, not really, that’s the context that i mean
<abstrakt>    consumerism, that’s the only context i know of where the word “backreference” has meaning
<consumerism>    how would i apply search/replace to this context?
<consumerism>    i was thinking of some yank/put sequence
<consumerism>    just couldn’t nail down the most efficient way
<abstrakt>    consumerism, how familiar are you with regex?
<abstrakt>    s/function(one, ‘two’)/function(‘two’, one)/
<consumerism>    like if my cursor is on the first (… dt,lplyt)F,P
<abstrakt>    would actually be the “simplest” way
<bencahill>    hey guys, I want to indent html in php files with the banner style (i.e. closing tag is indented), is there a way to do this?
<dindinx>    consumerism: :s!(\(.*\), \(.*\))/(\2, \1)
<abstrakt>    consumerism, nah, that’s way rediculous, just use regex
<abstrakt>    bencahill, you’ll need to either “do it yourself” aka, just hit the tab key or whatever… or you will need to modify the PHP syntax/indent file(s)
<abstrakt>    bencahill, though I wouldn’t doubt that if you are savvy enough with vimscript that you could accomplish this tweak via an “after” or “ftplugin” script
<bencahill>    abstrakt: I really don’t know the first thing about vimscript :-(
<abstrakt>    bencahill, then for your practical purposes the answer is “no”
<bencahill>    abstrakt: this script (http://vim.wikia.com/wiki/Better_indent_support_for_php_with_html) does exactly what I want, except it doesn’t indent the closing tag…I was wondering if there was a way to modify it so it does
<abstrakt>    bencahill, though obviously you’re still allowed to manually add as much whitespace as you wish, it just won’t be automatic
<abstrakt>    bencahill, it’s open source isn’t it?
<bencahill>    abstrakt: true, and that is an option, because I don’t do very much html
<bencahill>    abstrakt: the script?
<abstrakt>    my point is, vimscripts are open source… so now it’s either “deal with it” or “learn vimscript” or “beg for someone in here to do it for you”
<abstrakt>    the latter being not so likely to get positive responses
<abstrakt>    the secondary probably being your best bet
<abstrakt>    given that you are already dealing with the former
<bencahill>    abstrakt: you’re right, just thought I’d ask to see if someone had an off-hand solution with the particular problem ;)
*    bencahill learns vimscript
<abstrakt>    :)
<abstrakt>    bencahill, if you can program PHP you can program vimscript, it’s not hard, just Yet Another Syntax to learn
<bencahill>    abstrakt: cool, PHP has always been easy to me
<abstrakt>    bencahill, this channel is usually pretty good for vimscript related questions too
<kai>    abstrakt: I’m trying, thanks
<abstrakt>    kai, I would write a macro like this qa2f”f,a q
<abstrakt>    kai, then something like 3@a or 4@a should knock off a full line where you want to add spaces
<abstrakt>    kai, then all you need to do is navigate from line to line that requires re spacing by using /
<bencahill>    abstrakt: do you have any tips as to where to start? there doesn’t seem to be much online… :-/
<abstrakt>    kai, and given the nature of vim, what with vimscript and all, i’m sure you can probably automate that process as well
<abstrakt>    bencahill, yeh one sec
<kai>    abstrakt: right, I’ll try that. I just need to fix some other thing I broke to get a clean “just add space to commas” patch later
<abstrakt>    bencahill, help 41.txt
<abstrakt>    bencahill, chapter 41 of the built in vim manual is the vimscript guide
<bencahill>    abstrakt: awesome, thks
<abstrakt>    bencahill, some of the vim docs leave a bit to be desired, but they’re pretty good, and this channel serves as a decent supplement when the manual/guide is unclear
<tshauck>    hi, is there a way to only delete duplicate blank lines?  Like if I have 2 lines, I only want to delete line, but if I have 1 blank I’d like to leave it there
<strull>    tshauck: try :%!cat -s
<tshauck>    strull: worked great, thanks
<dindinx>    tshauck: :%s/\n\n\n/\r\r
<strull>    dindinx: aren’t you missing a \+ there?
<dindinx>    why? I just replaced 3 consecutive newlines by 2.
<paradigm>    dindinx: but what if there are four consecutive newlines?
<paradigm>    You would have to run your ex command a number of times in a row
<paradigm>    a \+ would fix that
<graywh>    :%s/\n\{3,}/\r\r/
<paradigm>    Could someone explain why a \n is used when searching and a \r is used when replacing?
<dindinx>    he only told about two consecutive blank lines.
<strull>    he said “like if I have 2…”
<strull>    paradigm: historical reasons
<paradigm>    What’s the difference?
<paradigm>    I thought vim treats them both as newline, no?
<paradigm>    I realize there’s a difference between carrage return and newline, but I though vim abstracts that away
<graywh>    it does
<graywh>    but it uses \n internally to represent NUL
<paradigm>    hmm
*    okayzed is now known as okay
<breadtk>    What is the shortcut for autocompleting a python function?
<breadtk>    I thought it was like ^N or something.. but that doesn’t seem to be working
<breadtk>    Or I guess I should say that it is  working but nto as good as I hope…
<paradigm>    breadtk: there’s a lot to vim completion, trying skimming :help ins-completion
<breadtk>    paradigm: Thank you. I’ll take a look at that.
<paradigm>    yep
<Adren>    Does any one have neverland-ansi.vim? I would like to try it out.
<cek>    how do I replace a block in visual mode?
<cek>    that is, i want to replace the selection on each line with new text
<abstrakt>    cek, c
<cek>    crap
<cek>    taht did it. i knew about d and I
<abstrakt>    cek, c is the same as d basically
<abstrakt>    cek, only difference is that c leaves you in — INSERT — mode when it’s done, d does not
<cek>    d doesnt allow to change the content, it just deletes it
<cek>    thanks!
<daniel___>    can anyone hazard a guess as to why i cant copy to clipboard anymore
<daniel___>    i reinstalled my OS (my .vimrc is at https://github.com/danielstockton/dotfiles) and now the only way i can copy outside of vim is select all > copy which takes with it all the line numbers
<daniel___>    “+y is what im doing
<Raimondi>    daniel___: PRobably you need to install gvim
<daniel___>    in fact this is the same in both my systems (dual boot ubuntu/arch), perhaps its the keyboard layout?
<daniel___>    any other bindings i can try?
<daniel___>    aaaah Raimondi, that could well be it
<daniel___>    thanks!
<Raimondi>    np
<daniel___>    Raimondi: it was indeed ;)
<Raimondi>    Good :)
<Azrathud>    Has anyone else had problems with vim not redrawing when resizing vim the terminal its currently in?
<Azrathud>    At least, does anyone know any fixes to the redrawing problems?
<strull>    Azrathud: ctrl-l
<Azrathud>    strull, I know of that command, but I’d like it to auto redraw like it did about a month ago.
<cafaro>    What’s the best/easiest way to share .vimrc/.vim etc. between users? I’d like to have vim behave identically when either using my own account, or when using root.
<nag>    cafaro: I use a symlink.
<cafaro>    Azrathud: yes I think I have to same “problem”, using urxvt with arch
<Azrathud>    cafaro, I’m using Arch and urxvt too O.o, but I the problem persists on xterm.
<cafaro>    nag: yeah that’s a good, idea, do you symlink just your .vimrc or all the files under ~/.vim as well?
<Azrathud>    It could’ve been due to some updates.
<cafaro>    Most likely yes
<paradigm>    cafaro: you can just symlink the folder ~/.vim, you don’t have to link every individual file within it
<cafaro>    Can’t recall having the same issue before
<cafaro>    ok great
<nag>    cafaro: I symlink .vimrc and .vim… a directory is a file, too
<cafaro>    yes, you’re right :)
<Azrathud>    cafaro, http://vim.1045645.n5.nabble.com/vim-in-terminal-fails-to-redraw-after-window-resizing-td4877176.html
<Azrathud>    It looks like it’s bug.
<Azrathud>    I think perhaps the repo hasn’t been updated with the patch for the bug yet.
<jbrokc>    goddamit – this doesn’t work and I have absolutely no idea why. please don’t tell me it’s a bad idea. I think it’s a fantastic idea (netrw never creating [scratch] buffers on <Enter>) https://gist.github.com/4b3f99cb8745bf2a701b – this is not removing the trailing / for some reason
<cafaro>    Azrathud: ok thanks, guess we’ll just have to wait for it ;)
<joe9>    Azrathud: Ctrl-W =, redraws the screen, doesn’t it.
<joe9>    i have the problems, where vim randomly does not show the full screen or windows.
<joe9>    i think Ctrl-W = takes care of it, or, there is some other command that I do not remember, but the muscle memory does. let me see what it is.
<joe9>    ^R or ^L
<joe9>    :redraw!
<jbrokc>    does anyone know why the following pattern doesn’t work substitute(“foo/”, “\/$\|\*$”, “”, “”) – i’m trying to make both “foo/” and “foo*” be “foo”
<Azrathud>    joe9, Actually inputting any command into vim makes it redraw for me. The manual redraw is just a pain when I want to resize a window and still be able to read the text inside.
<jbrokc>    aw man nobody knows?
<Raimondi>    jbrokc: Because you’re using double quotes as if they were single
<Raimondi>    ones
<jbrokc>    Raimondi: once I changed them I realized that (about 5 seconds ago)
<jbrokc>    its’ still not doing what I’d like which kind of sucks
<jimmy_birer>    man
<jimmy_birer>    vim is awesome
<jimmy_birer>    i can edit stuff
<jimmy_birer>    that i do in 10 mins
<Raimondi>    It works as you described, what do you want it to do?
<nordin>    hello guys, I program in several langauges, from C to PHP. I’ve installed some plugins to help code more efficiently. But how can I change settings (like textwidth, indentation, etc) automatically based on filetype?
<jimmy_birer>    in 3 seconds
<nordin>    can someone provide me a good link?
<jbrokc>    Raimondi: so as soon as I remove the \*$ it starts working like it should. I want to make the word under the cursor (which will either be a directory or filename in the netrw explorer) to just remove the trailing ‘/’ or ‘*’ that netrw puts there
<goldenwest>    nordin: au FileType php set …
<nordin>    goldenwest: aah, ok thnx man
<jbrokc>    Raimondi: but it doesn’t work for files… (with the * at the end)
<Raimondi>    jbrokc: pastebin some samples
<jbrokc>    Raimondi: sure
<jbrokc>    Raimondi: i don’t know how descriptive this is – let me kow if i can help further https://gist.github.com/2b85cd994c21be93f67a
<thebope>    hi, does anyone here use vim with their mac?
<thebope>    Because I’m wondering how I find out which version of ViM I have as well as how to install plugins
<jbrokc>    Raimondi: this, grossly, works
<jbrokc>    Raimondi: https://gist.github.com/f982d559bb4547a65cbe
<thebope>    it doesn’t appear to come with the same folders
<goldenwest>    thebope: you can just create you ~/.vim folder
<thebope>    okay and put a plugins and autload folder in those?
<goldenwest>    thebope: for version you can just go to MacVim -> About MacVim
<jbrokc>    goldenwest: or `vim –version`
<jbrokc>    err – cc thebope ^^
<goldenwest>    thebope: generally you just need to put them in the “plugin” folder
<goldenwest>    so “mkdir ~/.vim” “mkdir ~/.vim/plugin” “mv mycoolplugin.vim ~/.vim/plugin”
<Raimondi>    jbrokc: substitute(expand(“<cWORD>”), ‘[/*]$’, ”, ”)
*    yofel_ is now known as yofel
<kwtm>    How do I convert float to string?   E.g.   :let @+=7/2.5     I don’t see a float2str() even though there’s a str2float()
<goldenwest>    kwtm: :h string()
<kwtm>    goldenwest-  Thx! will try
<Raimondi>    jbrokc: Did you get the regex?
<jbrokc>    Raimondi: sjl helped me out – ‘\(\/$\|\*$\)’ but i used the \%(\) variant
<Raimondi>    Good
<jbrokc>    Raimondi: thought i tried that but I guess I skipped it and went for the GROUP ALL THE THINGS route \%(\/$\)\|\%(\*$\)
<Raimondi>    jbrokc: but in that case yu ocan use ‘[/*]$’ instead
<jbrokc>    omg…
<jbrokc>    yeah that would’ve been easier…
<jbrokc>    Raimondi: so substitute(expand(“<cword”), ‘[/*]$’, ”, ”) – i don’t need to escape them?
<Raimondi>    Nope
<jbrokc>    ah that’s not quite working…
<jbrokc>    oh nevermind
*    mikl1 is now known as mikl
<Adren>    :q
<Adren>    ops :D
<paradigm>    haha
<bencahill>    abstrakt: yay! I still don’t know much vimscript, but I was able to solve my problem…in html.vim: http://paste.pocoo.org/show/490659/
<abstrakt>    bencahill, nice, well done
<bencahill>    abstrakt: wasn’t expecting a compliment… thanks!! :-)
<jbrokc>    bencahill: that’s enough vimscript to get you by a lot man
<bencahill>    jbrokc: mainly learned just from going through the html.vim script line-by-line, and looking up things
<bencahill>    I take it from these comments that vimscript really isn’t very hard at all :)
<jbrokc>    bencahill: next step – :h vim-script  it’s super basic if you go through it line-by-line
<abstrakt>    bencahill, i’ve been loath to dive in to the actual indent stuff… i’ve written a few vimscripts, but i’ve got a similar PHP indentation pet peve and your snippet shall be useful to me
<abstrakt>    bencahill, so, that’s pretty cool, thanks :)
<bencahill>    abstrakt: awesome :)
<jbrokc>    abstrakt: i recommend hacking on vim-coffee-script
<jbrokc>    abstrakt: it has an indent/ file that’s pretty well commented
<abstrakt>    bencahill, it’s like any other “scripting” language, just with different syntax for the most part
<bencahill>    abstrakt: just so you know, this is following the ‘banner’ style of indenting: http://en.wikipedia.org/wiki/Indent_style#Banner_style
<abstrakt>    bencahill, all languages have loops and variables and functions for the most part, it’s just a matter of learning the libraries and you can pick and choose those as you go once you know the basics
<bencahill>    abstrakt: well, for me, it seems that PHP is much easier, than, say, JS or C/C++/C#/whatever, because it’s not ‘live’, if you know what I mean
<bencahill>    abstrakt: i.e. input comes in (POST and GET), you do stuff with it and files/functions/vars, and then you spit out the results (headers, then html)
<abstrakt>    bencahill, event driven is the proper term, but yes i understand
<nag>    I find PHP to be more ‘live’ than those things because you change and re-execute and it’s very quickly changing, same for Python, Perl, etc
<bencahill>    abstrakt: languages like those others seem to be harder because it’s realtime…although I really haven’t done anything with them (haven’t needed to
<bencahill>    abstrakt: ah, good to know, thks
<bencahill>    nag: you mean as far as compiling?
<abstrakt>    dealing with events isn’t what makes a programming language “difficult”
<bencahill>    or not having to compile, for that matter…
<abstrakt>    it’s more to do with the type flexibility
<bencahill>    abstrakt: I’m sure you’re right, I just haven’t dealt with it, so it seems foreign
<nag>    yep; it’s fluid and your changes are realized immediately
<abstrakt>    bencahill, what OS do you run
<bencahill>    abstrakt: arch linux x86_64
<bencahill>    abstrakt: what do you run?
<abstrakt>    bencahill, well, given the nature of arch, you’ve almost necessarily got gcc and make available… if you enjoy programming and intend to make a career out of it, it’s certainly worth your time to at least dabble in C, just so you can know how backwards it is :P
<abstrakt>    bencahill, windows XD
<bencahill>    abstrakt: ew
<nag>    C is not backwards… Make on the other hand…
<bencahill>    abstrakt: yes, doing anything in C would be very easy for me, given I have all the tools at my disposal :-P
<Zathrus>    C is not backwards.
<abstrakt>    bencahill, that’s all I’m sayin :)
<abstrakt>    hahaha, epic, and I’ll leave you in the hands of these well qualified gentlment to explain the nuances of C to you
<Zathrus>    however the vim codebase is not a good example of “sane C”
<bencahill>    abstrakt: I don’t hate on people who use win, I’ve simply found that for me, I can do what I need most efficiently in linux, hehe
<abstrakt>    bencahill, yeah that’s why I run *nix in virtualbox for all my development work :)
<bencahill>    abstrakt: yep :)
<abstrakt>    bencahill, netflix and games are what still keep me on windows
<goldenwest>    netflix?
<goldenwest>    i don’t get it
<bencahill>    abstrakt: right, that’s usually the thing for *nix users, something like games or photo/video editing apps
<bencahill>    …the thing that keeps them on windows, that is
<Zathrus>    goldenwest: you cannot do netflix streaming on Linux. Period.
<nag>    Zathrus: not yet.
<goldenwest>    oic – I’m on OSX
<Zathrus>    nag: yeah. Don’t hold your breath.
<abstrakt>    goldenwest, that’s BSD and it’s partially closed source as well
<goldenwest>    indeed – i haven’t been reading the convo
<goldenwest>    just saw “netflix is keeping me on windows”
<abstrakt>    goldenwest, so MS can feel safe installing silverlight
<abstrakt>    “netflix and games
<goldenwest>    right that
<abstrakt>    if it was just netflix, i’d probably be on OSX :P
<nag>    abstrakt: Darwin, perhaps, but most other modern BSD variants are completely open and free.
<bencahill>    abstrakt: never used OSX, but it must be better than windows as far as having a nice shell, and a *nix filesystem hierarchy…
<nag>    Zathrus: my understanding is that Netflix will be using some HTML5 thingy, with a proprietary browser extension for the DRM
<abstrakt>    althought, one thing is true though, you can’t portmap the virtualbox nat below port 1000 on *nix, so that includes ubuntu/arch/osx/etc, so you can’t directly forward port 80, which is wicked annoying
<goldenwest>    abstrakt: yeah, that’s my reasoning and I don’t play games
<Zathrus>    nag: that extension will still be binary code though.

© 2011 Techdot IRC Resources Suffusion theme by Sayontan Sinha