Re: batch swap file recovery
Not sure if this may be useful for some type of faq or something, but this did take me a little bit to figure out: for i in $(find -type f -not -path "./.git/*"); do f="${i/.\/}"; echo $f; \vim --cmd 'set backupdir=/home/swilson/.vim/swpfiles/' --cmd 'set dir=/home/swilson/.vim/swpfiles/' --cmd recover -c wq -N -u NONE "$f"; done On Sun, Oct 15, 2017 at 3:21 PM, shawn wilson wrote: > On Sun, Oct 15, 2017 at 3:18 PM, Christian Brabandt > wrote: >> >> On So, 15 Okt 2017, shawn wilson wrote: >> >>> I lost some work in a git repo (it was deleted - I've recovered a >>> point in time - but vim has newer data). So, is there a way to give >>> vim a list of files and try to recover the newest version in the swap >>> file and close? I know, it may give old data, but this should be >>> pretty easy to pick out in git (based on additions/subtractions)? >>> >>> something like: >>> find -type f -print0 | xargs -0 -i{} vim . {} >> >> Do you have those swapfiles still around? >> > > Yes, every file probably doesn't have a swp/swo file, but everything I > want does. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: batch swap file recovery
On Sun, Oct 15, 2017 at 3:18 PM, Christian Brabandt wrote: > > On So, 15 Okt 2017, shawn wilson wrote: > >> I lost some work in a git repo (it was deleted - I've recovered a >> point in time - but vim has newer data). So, is there a way to give >> vim a list of files and try to recover the newest version in the swap >> file and close? I know, it may give old data, but this should be >> pretty easy to pick out in git (based on additions/subtractions)? >> >> something like: >> find -type f -print0 | xargs -0 -i{} vim . {} > > Do you have those swapfiles still around? > Yes, every file probably doesn't have a swp/swo file, but everything I want does. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
batch swap file recovery
I lost some work in a git repo (it was deleted - I've recovered a point in time - but vim has newer data). So, is there a way to give vim a list of files and try to recover the newest version in the swap file and close? I know, it may give old data, but this should be pretty easy to pick out in git (based on additions/subtractions)? something like: find -type f -print0 | xargs -0 -i{} vim . {} ? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Optimized vim + tmux workflow
Pretty decent writeup. Though it does kinda bug me how people write so much about using vimux and command-t (which I too use inside of vim) but no one seems to comment on vim servername or the beans interface for going the other way. On Apr 19, 2017 1:20 PM, "Kristine" wrote: > You can customize vim and tmux to make them feel like one cohesive tool. > This blog post is a collection of tips to help optimize a vim and tmux > workflow to help get more done with less typing and context switching. > > https://blog.bugsnag.com/tmux-and-vim/ > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Moving a file
Sorry for the late reply (to my own thread). On Sun, Dec 11, 2016 at 1:36 PM, John Passaro wrote: > Vim normally offers a pretty lightweight bit of change detection and I think > Shawn was only asking how to apply that to a new filename. In that context, > ":saveas" seems to work: > > $ vim a > :saveas b > :! echo hello >> b > W11: Warning: File "b" has changed since editing started > Yes, this is exactly what I meant, and yeah :saveas was what I was looking for - thank y'all and sorry for the confusion. > John Passaro > (917) 678-8293 > http://riemann-summary.blogspot.com > http://www.soundcloud.com/a-straight-john-at-last > > On Sun, Dec 11, 2016 at 12:42 PM, wrote: >> >> >> > Shawn, what is it you're trying to do, exactly? The two parts of your >> > question ("changing which file a buffer points to" and "get notified >> > when a file is externally modified") are unrelated in vim. >> > >> >> This is a vim-related list, but this does raise the question of whether >> vim is even the appropriate tool? It sounds like some some sort of >> monitoring effort. >> >> Vim is wonderful for a human creating or updating a text, then going away >> to do something else. Operations involving multiple files, intermittent or >> unpredictable events, and other situations fit other programs better. >> >> The programs in the *nix tool chest are all powerful and flexible. As a >> result, sufficiently dedicated perversity can bend almost all of them to >> do jobs wildly different from their designers' intentions. (Video games >> written in sed, for example:https://github.com/aureliojargas/sokoban.sed >> .) Just because it's possible doesn't make it advisable. >> >> -- >> -- >> You received this message from the "vim_use" maillist. >> Do not top-post! Type your reply below the text you are replying to. >> For more information, visit http://www.vim.org/maillist.php >> >> --- >> You received this message because you are subscribed to the Google Groups >> "vim_use" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to vim_use+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. > > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Moving a file
How do I change which file a buffer is pointing to so that I can do a simple :w and get notified if an external app updates it, etc? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: RFE: support POSIX standard and developing RE's
On Apr 15, 2016 4:03 PM, "Eric Christopherson" wrote: > > On Tue, Apr 12, 2016 at 12:45 PM, L. A. Walsh wrote: >> >> Christian Brabandt wrote: >>> >>> There is https://github.com/vim/vim/issues/99 >>> You might want to check, if this works for you. >>> >> >> >> If vim supported posix extended RE's, then, like, say grep, >> it could also support Perl RE's, from the PCRE library. Perl supports >> the "/x" to ignore whitespace for readability. I.e. the author was saying >> they wanted to implement some flavor of PCRE's, but really wanted the "/x" >> feature, which would have been alot easier to do from Vim's current >> feature set. >> >> If Vim could _at least_ support extended 'RE's, and if it was done >> in a modular fashion, then it seems adding other 'RE' engines would be >> easier. Note, I don't know about current benchmarks, but PCRE was the >> fastest 'RE' engine out of any of the standard 'RE' engines as well, by >> far, the most expressive. Perl even bent over backwards to implement >> Python-RE specific features to make it easy to port Python-RE's along >> with all the POSIX RE's. >> >> - >> BPJ wrote: There is https://github.com/vim/vim/issues/99 You might want to check, if this works for you. >>> >>> >>> If I'm not mistaken that's "extended" as in /x, a different sense from "extended" as in ERE. >>> >>> i would like to have "extended as in /x" FWIW. >> >> If vim could include the PCRE engine (then you'd have this automatically). >> And you are right "/x" is not the same as POSIX extended RE's, but is the >> same as PCRE's "/x" switch. > > > Just FYI: > > The name Perl-Compatible Regular Expressions is a misnomer. PCRE is not strictly Perl-compatible (and I'm guessing Perl doesn't deal 100% appropriately when fed PCRE either, although it has picked up at least some of PCRE's extensions). It's not part of the Perl project. > That's why I listed libperl *and* libpcre. I definitely find libpcre lacking (being a perl user). -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: RFE: support POSIX standard and developing RE's
Instead of implementing one or another regex type in core, it might be better to know about and hook into libs for their regex engines. For example, libperl for perl's engine when +perl or libpcre as another option. IDK you can do the same with python, I think you can with ruby and IIRC Lua uses libpcre. On Mar 24, 2016 8:13 AM, "BPJ" wrote: > > > torsdag 24 mars 2016 skrev Christian Brabandt : > >> On Do, 24 Mär 2016, L. A. Walsh wrote: >> >> > Posix, has 2 official RE's already, the modern REs( like in >> > grep -E, (extended RE's) >> > and "obsolete RE's" as found in ed, called "basic REs". >> > >> > Additionally for the past few years, more gnu utils (like grep -P) >> > have started supporting a third type of RE's called >> > PCRE [Perl Compatible RE's] that seem to be on their way >> > to becoming a 3rd official type of RE. >> > >> > Would it be possible to add the 3 RE's (w/appropriate flags) >> > to invoke those standardized expressions (not as a replacement >> > for any of the existing RE's), but w/different flags. >> > >> > This would allow those who know the posix-compat RE's that >> > are becoming more wide spread in usage, and would allow for >> > easier, direct usage (cut&paste) of the alternate RE's specifically >> > to make it easer to define these expressions in shell-vars and/or >> > vim-macros to allow for easier portability and usability between >> > vim and other posix & gnu utils? Note in the past few years, >> > the pcreRE's have also added python-specific features to the >> > syntax to allow for easier porting of python features. >> > >> > Probably (or maybe) best of all, as all of these RE's are >> > becoming more prevalent in posix, unix and linux environments, >> > it would be a great benefit for people to be able to switch >> > to alternate RE's based on familiarity and and the greater >> > uniformity in these classes. >> > >> > Seems this would lower the learning curve for RE usage in >> > vim where it often, idiosyncratically differs from such, >> > requiring much trial and error and wasted time to get >> > equivalent vim-compat-RE's that are equivalent to other >> > industry standard RE's. >> > >> > Anyway, thought I'd mention this, since vim already has >> > multiple incompatible RE's with existing standards and >> > thought that providing a few "new POSIX-compat RE's" would >> > only help in making vim easier to use. >> > >> > Thanks for your time! >> > -linda >> >> There is https://github.com/vim/vim/issues/99 >> You might want to check, if this works for you. > > > If I'm not mistaken that's "extended" as in /x, a different sense from > "extended" as in ERE. > > i would like to have "extended as in /x" FWIW. > > >> >> Best, >> Christian >> -- >> Mögest Du leben, solange Du willst - und wollen, solange Du lebst! >> >> -- >> -- >> You received this message from the "vim_use" maillist. >> Do not top-post! Type your reply below the text you are replying to. >> For more information, visit http://www.vim.org/maillist.php >> >> --- >> You received this message because you are subscribed to the Google Groups >> "vim_use" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to vim_use+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: override record
On Tue, Nov 10, 2015 at 11:07 AM, shawn wilson wrote: > On Tue, Nov 10, 2015 at 11:05 AM, Ben Fritz wrote: >> On Tuesday, November 10, 2015 at 9:44:33 AM UTC-6, shawn wilson wrote: >>> On Tue, Nov 10, 2015 at 10:19 AM, Tim Chase wrote: >>> > On 2015-11-10 07:38, shawn wilson wrote: >>> >> How about this - is there an event that I can use to just redefine >>> >> what vim already made with the same information? >>> An autocommand trigger >>> >> One that would fire under what circumstances? >> > Fires when a register is changed. Since I've looked through lots of autocommands and nothing looks promising and no one has gotten back here, there's not a good way of doing what I want? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: override record
On Tue, Nov 10, 2015 at 11:05 AM, Ben Fritz wrote: > On Tuesday, November 10, 2015 at 9:44:33 AM UTC-6, shawn wilson wrote: >> On Tue, Nov 10, 2015 at 10:19 AM, Tim Chase wrote: >> > On 2015-11-10 07:38, shawn wilson wrote: >> >> How about this - is there an event that I can use to just redefine >> >> what vim already made with the same information? >> > >> > I'm not sure what you mean by "an event". >> >> An autocommand trigger >> > > One that would fire under what circumstances? > Fires when a register is changed. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: override record
On Tue, Nov 10, 2015 at 10:19 AM, Tim Chase wrote: > On 2015-11-10 07:38, shawn wilson wrote: >> How about this - is there an event that I can use to just redefine >> what vim already made with the same information? > > I'm not sure what you mean by "an event". An autocommand trigger > > You can also execute the expression register as a macro if you need: > > :let first=@a[:15] > :let remainder=@a[16:] > @=first . "my replacement here" . remainder > That's kinda cool - I'll have to remember that. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: override record
How about this - is there an event that I can use to just redefine what vim already made with the same information? On Nov 10, 2015 6:35 AM, "Tim Chase" wrote: > On 2015-11-10 09:12, Tim Ferguson wrote: > > : let @a = a > > > > and that puts the content on the edit line for you to edit it > > visually. > > You have to deal with escaping issues here (and remember to quote > it). So it would be > > :let @a='a' > :let @a="a" > > but then go back and escape any single/double-quotes in your macro > (and in the double-quote case, there are other metachars that would > need to be replaced if they're in your macro). > > -tim > > > {An other} Tim > > I have longevity and less duplication here, so I tend to use "Tim" > when signing off whereas on the Python mailing list, I'm one of many > Tims, some of whom are much more famous, so I sign off there with my > initials which are more unique. > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: override record
Yeah, I've been pasting it and yanking it - just would be easier if i could : (or q:) and edit. I haven't been able to find any plugins to do this, so apparently no one else thinks so though :( On Mon, Nov 9, 2015 at 1:28 PM, Tim Chase wrote: > On 2015-11-09 11:15, shawn wilson wrote: >> I'd like to make record/'q put the let @=stuff in my >> command buffer to make doing minor edits easier - is there an easy >> way to override the default functionality and keep let it do the >> rest of what it does? > > Because the content is just recorded to a register, you can either > > 1) paste the register into a new buffer, edit, and re-yank back into a > register (either the same or another one) > > 2) assign to it with the desired changes: > > :let @a=substitute(@a, 'foo', 'bar', 'g') > > There might be other plugins that make this easier, but either of > those should work in most builds of vim. > > -tim > > > > > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
override record
I'd like to make record/'q put the let @=stuff in my command buffer to make doing minor edits easier - is there an easy way to override the default functionality and keep let it do the rest of what it does? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
quickfix as a menu
Can I use quickfix as a menu (somewhat like command-t does, but I'd like to make an email client that uses a local maildir, so it wouldn't be displaying the actual filename (use a hash w/ the file string as the value probably)...? If not quickfix, I guess I'm looking for another temporary buffer I can make a selection menu in. Or maybe some way of extending Explore? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
function callback
is there a way to make a function call another function w/o needing to quote the string? function! Test1(fn) call fn " also tried eval endfunction function! Test2(foo) echo foo endfunction :call Test1(Test2("bar")) should also technically work if i did: :call Test1(Test1(Test2("bar"))) but neither does -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: redirect output to a command line
nm, I think I got it: vim --servername SWILSON --remote-send ':call RedirFile("tabs", "/dev/pts/57")' with: function! RedirFile(cmd, file) redir => message silent execute a:cmd redir END let lines = split(message, '\n') call writefile(lines, a:file) endfunction In my vimrc seems to do what I want On Wed, Sep 16, 2015 at 6:00 PM, shawn wilson wrote: > I often want to query vim from a command line - so for example: > vim --servername SWILSON --remote-send ':tabs' > > executes fine and displays the results in vim and i get nothing on the > command line. I either want a simple shell style redirect (and then > spit it out to $tty) or redirect to a buffer and save that (though > having vim save that to /dev/stdout probably isn't going to give me > the result I want). -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
redirect output to a command line
I often want to query vim from a command line - so for example: vim --servername SWILSON --remote-send ':tabs' executes fine and displays the results in vim and i get nothing on the command line. I either want a simple shell style redirect (and then spit it out to $tty) or redirect to a buffer and save that (though having vim save that to /dev/stdout probably isn't going to give me the result I want). -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Turn off colors for just for vimdiff
s/config/vimrc/ On Sun, Mar 22, 2015 at 8:11 AM, shawn wilson wrote: > Is there a way to turn off t_Co just for vimdiff/:diff from the > config? I'd prefer to do this in the config so that :diff still does > what I want vs just an alias for vimdiff. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Turn off colors for just for vimdiff
Is there a way to turn off t_Co just for vimdiff/:diff from the config? I'd prefer to do this in the config so that :diff still does what I want vs just an alias for vimdiff. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: recursive undo in git
On Mon, Feb 2, 2015 at 8:18 AM, LCD 47 wrote: > On 1 February 2015, shawn wilson wrote: >> Is there a way to save or convert vim's undo history into a git >> history? > > No, but you can use the excellent plugin Gundo to navigate through > the history: > > http://sjl.bitbucket.org/gundo.vim/ > > You can also combine Gundo with undofile, undodir, and a large > undolevels for an almost complete solution. > Yeah, I have gundo - haven't used it much. But basically I came across this: http://qz.com/335942/an-author-used-a-tool-for-programmers-to-write-a-book/ And thought how cool it would be to see that in a repo vs changes (obviously, one would want to amend ore rebase to put something more human in some of the histories, but that'd be kinda cool to have in something that could be shared. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
recursive undo in git
Is there a way to save or convert vim's undo history into a git history? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Bug/feature
That fixes the clipboard (I suppose - the patch looks good but I haven't tried it) but doesn't address the servername going away. On Oct 16, 2014 5:27 PM, "Christian Brabandt" wrote: > Hi shawn! > > On Do, 16 Okt 2014, shawn wilson wrote: > > > With vim still running (in tmux/screen/whatever), restart X. The > > servername will be lost and the + buffer won't be attached to the X > > session anymore. I /think/ I can make a full test for this if y'all > > want. > > > > VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 12 2014 02:41:35) > > Included patches: 1-31 > > > > IDK if this is a bug or a feature - I wouldn't expect vim to > > continuously poll X and do whatever is required to make stuff work, > > but I would like a re-init feature that takes vim through startup > > without messing with buffers/tabs/etc. > > This is issue https://code.google.com/p/vim/issues/detail?id=203 > > Best, > Christian > -- > Sorgen sind wie Babies: Je mehr man sie hätschelt, desto besser > gedeihen sie. > -- Helmut Qualtinger > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Bug/feature
With vim still running (in tmux/screen/whatever), restart X. The servername will be lost and the + buffer won't be attached to the X session anymore. I /think/ I can make a full test for this if y'all want. VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 12 2014 02:41:35) Included patches: 1-31 IDK if this is a bug or a feature - I wouldn't expect vim to continuously poll X and do whatever is required to make stuff work, but I would like a re-init feature that takes vim through startup without messing with buffers/tabs/etc. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: disable syntax highlighting for a section
On Mon, May 5, 2014 at 10:28 AM, Christian Brabandt wrote: > Am 2014-05-02 23:46, schrieb shawn wilson: > >> Sometimes (especially in documentation) syntax highlighting really >> messes up. However, I don't really want to highlight documentation >> anyway, so can I disable it per line? >> >> So, basically, what I want is to be able to select a block and say, >> don't do anything from within this block (and maybe have it set a mark >> or something so that I can insert stuff in the middle and it won't >> mess with new text)? > > As for your original problem, read the help at :h :syn-sync and see if you > can > manually resync the syntax engine, if you notice wrong behaviour. I assume, > you only experience this for a specific filetype Yeah, md (markdown) and pod iirc (perl). But when it happens, I'm not caring about handling it properly :) I might go back for the commit bit, but not when vim is messing with me. > > Nevertheless, you can trick the syntax engine to stop highlighting specific > lines. This is rather hacky approach, but it should work. You would add some > specific syntax matches, that link to a not-defined syntax group and > use a pattern with the \%l line matching. Thanks for that. It seems to do what I want. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
disable syntax highlighting for a section
Sometimes (especially in documentation) syntax highlighting really messes up. However, I don't really want to highlight documentation anyway, so can I disable it per line? So, basically, what I want is to be able to select a block and say, don't do anything from within this block (and maybe have it set a mark or something so that I can insert stuff in the middle and it won't mess with new text)? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: --remote-expr
Do --serverlist to confirm that's running On Apr 21, 2014 7:40 AM, "Ni Va" wrote: > > > OS : Windows 8.1 > > While I happen to call a BasicTask() that echoes "foo" into Vim server > named JOB_1, I don't success to do the same thing with this executed > command from Gvim: > > > From console prompt : vim --servername JOB_1 --remote-expr BasicTask() => > OK t displays foo > > From executed command within GVim: > exe "!start cmd /c "vim --servername JOB_1 --remote-expr BasicTask()"" > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
expand tab when copying into x
Generally when I copy something with hard tabs (a makefile right now) into X ("+y) I actually want soft tabs even if I don't have expandtab set for the file. But, if I paste into a console (IRC for instance) it tries to do an autocomplete. Is there a way to expand tabs for just this type of copy? Ie, I wouldn't want this functionality for yanks into other buffers. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: search unfolds
thanks On Wed, Mar 19, 2014 at 3:37 PM, Christian Brabandt wrote: > > On Mi, 19 Mär 2014, shawn wilson wrote: > >> I like incsearch. The problem is that it unfolds stuff as I go along. >> How do I modify this behavior? I suppose the optimal behavior would be >> to refold as it moves along until I hit enter. Though if the easiest >> way is to just keep folds (search into them but not unfold), I guess >> that'd be fine (half defeating incsearch but I could live with that). > > I think you want to look into tweaking your 'foldopen' setting. Read :h > 'foldopen' for the glory details. > > Best, > Christian > -- > Wie man sein Kind nicht nennen sollte: > Ray Gierung > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
search unfolds
I like incsearch. The problem is that it unfolds stuff as I go along. How do I modify this behavior? I suppose the optimal behavior would be to refold as it moves along until I hit enter. Though if the easiest way is to just keep folds (search into them but not unfold), I guess that'd be fine (half defeating incsearch but I could live with that). -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
X copy buffer
If I have vim open in a tmux session and X crashes, when I reopen it, it appears the + buffer doesn't work anymore. Is there a way to fix this without closing vim? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Copying and pasting text to Vim [Was: Do developers use vim exclusively or alternate with an IDE?]
On Tue, Jan 14, 2014 at 3:11 AM, Erik Christiansen wrote: > On 14.01.14 11:36, Sam Bituser wrote: >> Copying and pasting text from outside of the editor. E.g. modifying an HTML >> page by swapping odd bits of text from another document. It just feels >> clunky to me and I often find myself using eclipse instead. > > For me, Vim works just like any other application, as far as pasting > goes. If the other app is a GUI, then with the mouse: > >a) Highlight the text to be copied - one word or a thousand. >b) Move cursor over the Vim window and whack the middle mouse button. > > Vim just stays in insert mode, so alternation between typing and pasting > is seamless. Going back to edit the imported cruft costs one Esc, as > always. I'm having trouble seeing any clunkiness there, other than > having to reach for the mouse. ;-) > > OK, I tend to leave autoindent on, and so have to set "paste" in Vim > beforehand, to avoid staircase text while pasting, and then set nopaste > afterwards. To minimise keystrokes, I have in .vimrc: > > set pastetoggle= Though, if you use the native xclipboard (and have the feature - I think it's called 'clipboard') then you can just do "+p and not have to worry about toggling anything or 'staircase' issues. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Move to previous tab after quit
Well, I guess it's good to know it's on the short term road map - default behavior is sorta annoying :) Thanks for the links too. I'll try that last SO comment or the comment on wikia (looks the same). On Fri, Nov 1, 2013 at 2:40 PM, Nicolas Dermine wrote: > > On 1 Nov 2013 19:34, "Ben Fritz" wrote: >> >> On Friday, November 1, 2013 1:14:50 PM UTC-5, shawn wilson wrote: >> > When I quit a window with multiple tabs open, I am placed in the tab >> > >> > to the right. This is an issue because when I open a new tab, that is >> > >> > opened in the tab to the right which, if I'm working on different >> > >> > projects in one session, makes things out of order. I like tabs to be >> > >> > open to the right of where I am but would like to move to the tab to >> > >> > the left when closing a window. How can I do this? >> > >> > >> >> A couple of suggestions here: >> >> http://vim.wikia.com/wiki/Have_focus_on_left_tab_after_tabclose >> >> Neither one is very automatic. >> > > Some more here : > > http://stackoverflow.com/questions/14079149/vim-automatically-show-left-tab-after-closing-tab > > Nicolas > >> -- >> -- >> You received this message from the "vim_use" maillist. >> Do not top-post! Type your reply below the text you are replying to. >> For more information, visit http://www.vim.org/maillist.php >> >> --- >> You received this message because you are subscribed to the Google Groups >> "vim_use" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to vim_use+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Move to previous tab after quit
When I quit a window with multiple tabs open, I am placed in the tab to the right. This is an issue because when I open a new tab, that is opened in the tab to the right which, if I'm working on different projects in one session, makes things out of order. I like tabs to be open to the right of where I am but would like to move to the tab to the left when closing a window. How can I do this? I tried this: " Move to previous tab when quitting cmap q qgT Which (besides not working) has two drawbacks: if I close a split, I don't want to switch tabs and if I'm on the first tab, I don't want to cycle to the far right one. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
test directory writable
I see filereadable() and filewritable() but I don't see how to do that with a directory. My problem is that our vimrc specifies a swpfile directory which is fine for users created with skel, but if it's not present (for root or users not created with skel) I'd like it to not error and require :w! and the like to function. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Save a selection
On Thu, Oct 17, 2013 at 9:53 AM, Ben Fritz wrote: > On Thursday, October 17, 2013 7:48:25 AM UTC-5, shawn wilson wrote: >> My problem is that I often select a portion of code and do multiple >> >> :%s/foo/bar/g (or /gc - whatever) after, the code selection disappears >> >> and I need to select that area again if I want to replace something >> >> else. I can remember line numbers or put a mark at the end. Is there a >> >> way to save the selected area or a better way to do this? > > Everybody suggested gv to reselect the area, I'm surprised nobody mentioned > that you don't NEED to reselect the visual area, nor do you need to manually > set marks. > Well, it is what I asked for :) And I definately appreciate that - it'll come in handy when I yank something and realize I wanted more/less and the like to. > Every time you create a visual selection, Vim automatically sets the '< and > '> marks. > For some reason, I just didn't think that was stored. No idea why. Thanks. > So to run several sequential commands on the same visual selection: > > {make visual selection} > :'<,'>FirstCommand > :'<,'>SecondCommand > :'<,'>ThirdCommand > :'<,'>Etc > > Note that for FirstCommand, as soon as you press :, the marks '<,'> are > inserted for you by Vim. The others you can enter manually or use > command-line history to recall a previous command you can edit. > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Save a selection
My problem is that I often select a portion of code and do multiple :%s/foo/bar/g (or /gc - whatever) after, the code selection disappears and I need to select that area again if I want to replace something else. I can remember line numbers or put a mark at the end. Is there a way to save the selected area or a better way to do this? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: auto set
Thanks, I'll look at the three listed there this weekend. On Fri, Oct 11, 2013 at 5:10 PM, Ben Fritz wrote: > On Friday, October 11, 2013 3:29:14 PM UTC-5, LCD 47 wrote: >> > There are a few scripts that detect the indent settings for a >> >> > file. Search the web for "detect indent in Vim" or take a gander at >> >> > this list: >> >> > >> >> > http://vim.wikia.com/wiki/Indenting_source_code#Related_plugins >> >> > >> >> >> Not mentioned in that list, but also relevant I think: >> >> https://github.com/tpope/vim-sleuth > > > Thanks! I just added it. > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
auto set
Is there a plugin to try to automatically determine the coding style of a file? So, determine tabwidth, soft/hard tab, block style (so if I hit { sometimes it needs a line break, sometimes not), etc. I want something that tries to automate per file vim settings and not something that corrects code style (which is the only thing can find). -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: block mode paste feature
Not a bad idea. I guess no one thinks this should be an internal 'feature'? On Thu, Sep 12, 2013 at 10:04 PM, Charles E Campbell < drc...@campbellfamily.biz> wrote: > shawn wilson wrote: > >> Can vim be made to DWIM here? I did a quick search and found I'm not the >> only one who has run into this. For example: >> http://briancarper.net/blog/**341/ <http://briancarper.net/blog/341/> >> >> Just to re-explain what I want: when you visually select a block, you can >> change or insert and it will change the block but when you paste a single >> line buffer (I can see how this might get not be so simple for pasting >> multiple lines) it only changes the first line. The "fix" of using C+R in >> insert mode as was mentioned works, but the behavior isn't what I expect. >> >> Seems to me that you could set up a pair of vnoremaps (of p and P) to do > what you want: > > vn PI" > vn pA" > > Regards, > Chip Campbell > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit > http://www.vim.org/maillist.**php<http://www.vim.org/maillist.php> > > --- You received this message because you are subscribed to the Google > Groups "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to > vim_use+unsubscribe@**googlegroups.com > . > For more options, visit > https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> > . > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
block mode paste feature
Can vim be made to DWIM here? I did a quick search and found I'm not the only one who has run into this. For example: http://briancarper.net/blog/341/ Just to re-explain what I want: when you visually select a block, you can change or insert and it will change the block but when you paste a single line buffer (I can see how this might get not be so simple for pasting multiple lines) it only changes the first line. The "fix" of using C+R in insert mode as was mentioned works, but the behavior isn't what I expect. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: q key
Yeah, that was meant for the list. Ah, should've guess based on the :verbose map that I needed to :unmap . I think you're right about not wanting to overwrite defaults. Though you can also use soy from cli by running soywiki (which I would never do since I like one gvim session using tabs) so, I'm not sure if there's a usecase there. I'm tempted to say that you're still right in a stand alone situation as I use the hell out of macros (because I'm too lazy to think of a regex). On Fri, Aug 30, 2013 at 8:11 PM, Tim Chase wrote: > [you replied only to me rather than to the list; I'm copying the list] > > On 2013-08-30 19:50, shawn wilson wrote: > > Ok, soywiki set it to :close ... question one answered (that's > > annoying) - and the second part - how to unset it? > > It may depend on how it was loaded. If it was part of a plugin, it > might be a bit trickier (I'm not sure how plugin loading interacts > with vimrc settings). Push come to shove, you can manually issue > > :unmap q > > to clear the mapping. Alternatively, you can nuke the problematic > line from the plugin: > > https://github.com/danchoi/soywiki/blob/master/lib/soywiki.vim#L403 > > Personally, I'd consider the absence of this mapping a great > improvement (overwriting vim's macro functionality is just a kick in > the teeth!) and have no regrets nuking that line. > > -tim > > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
q key
Somehow my q key has gotten hijacked as the quit command. How do I figure out what happened and unbind it (not being able to record a macro is really messing with my work flow). -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Vim + RSS + MAIL
Not exactly sure what the end goal is here but I use vim as a pager within mutt and mutt works very much like vim in many ways. -Original Message- From: Tim Chase To: vim_use@googlegroups.com Cc: alexkg.2...@gmail.com Sent: Sat, 24 Aug 2013 17:51 Subject: Re: Vim + RSS + MAIL On 2013-08-23 23:01, Alex K wrote: > Every day I look through a lot of news via RSS and mail subscribe. > Would like to have functionality to load them in VIM directly, read > and quickly insert some of them into my vimwiki notes. Also it > would be great to do this with my mail mesages. Is there any > plugins to do that? I am ready to create myself but need some > advices: > - Is there any compatible with VIM/python free library to > download/parse rss/mail? > - Can you give some link to helpful materials about this issue? There are several programs which will send RSS to your email, which reduces the problem to one of accessing email within Vim. With the passing of Google Reader, I switched to rss2email (sends to your mailbox via SMTP). But there are some others such as rss2imap and feed2imap which cut out the SMTP sending and talk directly to your IMAP account. I haven't played much with "newspipe" but I understand it to be similar to the ones above. Once you have your RSS in your email, you can pull it locally with any of a number of tools: mutt, pine/elm/alpine, fetchmail, offlineimap, etc. (most of those save locally in mbox or maildir format, so you can just pull in the body; alternatively, several of them allow for using an external editor which usually defaults to vi/vim or $EDITOR or $VISUAL) One might even be able to cut out the mail part by directly using something like "rss2maildir" which might do everything you need. -tim -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
feature request - encrypt vim 'save' files
Some things that vim keeps can leak information. I'm curious if there would be any issues with encrypting backupdir, directory, undodir, and viminfo files? Basically, I'm thinking that either vim could either use a per file pass based on a keyring or a global password. If this feature were on and the password / decryption failed, a non-encrypted file could be used (encrypted filetypes would be defined with an extension so having one file with an encrypted and plaintext swpfile for instance, would be sane). That or the file just isn't written/used if the feature is on and no/wrong password is present. Thoughts? PS - If I open a file that allows write for a group I'm in, I can write it and will get a swpfile with permissions for my default group. This is a part of the data leakage I'm talking about. PPS - https://github.com/jamessan/vim-gnupg does the right thing (with not saving anything externally). -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: vim + tmux
set winminwidth=0 Sent from my android device. -Original Message- From: Claus Atzenbeck To: vim_use Sent: Tue, 23 Jul 2013 5:11 Subject: vim + tmux Hi all: I'm using Vim 7.3 in combination with tmux 1.8 on Mac OS 10.8.4. Vim shows a strange behavior on tmux's vertically split windows. For example, when deleting a couple of lines, I receive the message 6 fewer lines Press ENTER or type command to continue Why does Vim ask me to press enter? This only happens in tmux *vertical* split windows. -- It does *not* happen in horizontally split windows or in not split windows. Based to which rules does Vim ask to press enter? Is there a config option to suppress that? Thanks for any hint. Claus -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: regex variable
Just to be clear, I mentioned Ruby because don't like libpcre as much and haven't used ruby enough for Oniguruma (http://www.geocities.jp/kosako3/oniguruma/) to piss me off and afaik, there would be no detatching perl's regex engine from perl. So it was more of a comment of "I know these exist, would it be a good thing to have and a decent feature request to have the ability to compile other regex eingines in". On Fri, Jul 19, 2013 at 10:02 AM, Ben Fritz wrote: > > For searching it's not possible to use a different syntax, but you can easily > do it for substitution via :perldo, :rubydo, :luado, etc. That is, if you > have your Vim compiled with support for your language of choice. > That's awesome, no more dropping out of vim to do a perl -ne. Not what I'm looking for here, but awesome none-the-less. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
RE: regex variable
On Jul 18, 2013 11:48 PM, "John Beckett" wrote: > > shawn wilson wrote: > > This is probably a feature request but I really do hate the > > regex engine and would love to swap it out. Is there / can > > there be a compile time option to use a different engine? > > No (I assume you want different regex syntax, probably PCRE). > libpcre would be fine, yes. Or the library that Ruby uses - either way. > Tony's post is talking about a new Vim regex engine intended to > be fully compatible with the old syntax, but faster. > Though this means there's already code for choosing between engines which is good. > Like Vim's scripting language, Vim's regex syntax makes a lot of > sense for editing text because they provide procedures that > often work in an optimum way. > Yeah, it looks like sed's syntax. If I'm used to writing things one way (say in code) and then hit '/' to do a similar thing inside my editor, switching mindset constantly makes me loose my thought (generally what happens) or make stupid errors like earlier in this thread. I guess this should be a feature request then? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: regex variable
On Jul 18, 2013 5:54 PM, "Ben Fritz" wrote: > > On Thursday, July 18, 2013 3:51:01 PM UTC-5, Lech Lorens wrote: > > On Thursday, July 18, 2013 3:42:06 PM UTC+2, shawn wilson wrote: > > > > > > I'm constantly looking for the first octet of IP addresses, so I do: > > > /[^0-9\.]10\. > > > > > > > Slightly off-topic, but wanted to make you aware that [^\.] matches anything that isn't a dot AND IS NOT A BACKSLASH. IOW backslash is not escaping the dot inside the [] range. > > > > And furthermore the . doesn't NEED escaping inside the [] range. > This is probably a feature request but I really do hate the regex engine and would love to swap it out. Is there / can there be a compile time option to use a different engine? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: regex variable
Sweet, didn't know about C+r - that works. I'll look more into the leader stuff (which'll probably work better) later. Thanks On Thu, Jul 18, 2013 at 9:55 AM, Marcin Szamotulski wrote: > On 09:42 Thu 18 Jul , shawn wilson wrote: >> Is there a way of using a variable in a regex? >> >> I'm constantly looking for the first octet of IP addresses, so I do: >> /[^0-9\.]10\. >> >> What I've been doing is hitting / and up arrow and then edit but if I >> could store [^0-9\.] in something easily accessed, that would save >> some time. > > Hi, > > You can set: > :let ip='[^0-9\.] > and then use: > /^r=ip > (i.i. hit '/' for search, the CTRL+r, then =, then write the variable name and > then hit ). See ":help c^r=" for the expression register. > > But maybe more useful is make a mapping: > cmap i ['0-9\.] > > or even better allow for this map only in search: > cmap i (getcmdtype() == '/' ? "['0-9\\.]" : '\i') > > I assumed here that your key is set to '\', otherwise you just > have to modify the '\i'. > > Best regards, > Marcin > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: regex variable
On Thu, Jul 18, 2013 at 9:50 AM, Gautier DI FOLCO wrote: > 2013/7/18 shawn wilson >> What I've been doing is hitting / and up arrow and then edit but if I >> could store [^0-9\.] in something easily accessed, that would save >> some time. > > > for example: > :%s/\([^0-9\.]\)10\./\1/g > Uh, I guess I wasn't clear - I have no issues writing regexes - the goal is to stop typing the same thing over and over again. I figure maybe there's a way to access variables within the interpreter or match() or maybe run a macro within one of them. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
regex variable
Is there a way of using a variable in a regex? I'm constantly looking for the first octet of IP addresses, so I do: /[^0-9\.]10\. What I've been doing is hitting / and up arrow and then edit but if I could store [^0-9\.] in something easily accessed, that would save some time. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Simplified logo concept
I agree with the need to update the logo (and the complaints about the old one). I would also like to see the web site maintained as a public repo. However, to that end - the one thing I like about old looking web sites is that when I open them up in lynx/links (rare, but when I do this I really need it to work) nothing is lost and I can find what I'm looking for. If anything breaks this, I'm absolutely opposed. On Jul 10, 2013 5:34 AM, "Paul Isambert" wrote: > "Christian Brabandt" a écrit: > > On Wed, July 10, 2013 06:22, James Beck wrote: > > >> What's wrong with it? > > >> > > >> > > >> Best regards, > > >> Tony. > > > > > > I have a few complaints about the original logo. > > > > > > 1. It's very busy (seven colors?!) > > > 2. It doesn't print well (seven colors, hairline borders, gradients) > > > 3. It's inconsistent (some parts are embossed, others not. Shading is > done > > > in both blue and black.) > > > 4. The font styles ("V" and "im") are different (this makes my eyes > > > twitch) > > > 5. The "m" looks like someone melted it with fire. Inelegant and weird. > > > 6. As a general rule, when loud background texture (green diamond) cuts > > > through text, it makes me twitch (see the treatment of "im") > > > > Good points. I don't really like the modern flat style of icons nowadays > > (perhaps I am just not used to it yet), but I would appreciate a new > > fresh look of the old logo. > > I think the complaints are quite valid too, but I don’t really like > James’s proposal either: > > - I think the logos would really fit a detergent. (I do appreciate the > simplicity, though.) > - Why a slab serif, and why a *slanted* slab serif? For me, that > contradicts the simplicity of the design; you’re whispering with > colors and screaming with the font. > - Lowercase initial is trendy; but is that really Vim? I wonder > whether all-uppercase wouldn’t be better. > > As far as I’m concerned, I’d like a simple logo in a simple > yet stately font: a humanist serif or even Roman capitals like Trajan. > After all “Vim” is the accusative of “vis”, meaning “strength, power”, > and all those kinds of properties you associate with our favorite text > editors (and tyrants, too). If the green diamond must be kept in the > background, though, that really makes things hard. > > Thank you James for launching the idea and submitting proposals (I > hope my criticism wasn’t too unpleasant). > > Best, > Paul > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
textwidth
How do i disable text width for everything but .txt, and .tex and program comments? Is this possible? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Terminal escape sequence ^[[A
See terminfo / termcap also make sure you're using, exporting, and that the emulator knows what terminal it should be emulating. Another hint, the search path for terminfo (iirc) is: $TERMPATH, ~/.terminfo, /etc/terminfo, /usr/share/terminfo - if you don't have a compiled terminfo file with the right name in one of those places, don't try setting the terminal to the name as it won't work. It might also help to subscribe to some Unix related lists (or one for cygwin or putty) or get on IRC. There's a technical reason for this - when I Google (or search my email) for info related to this subject, if I see a link or email related to vim in my search, I'm probably going to pass it by thinking the question was misplaced and the responses probably a waste of time. Ie, don't keep your questions on topic because the people reading that forum might not care about or be ignorant of the topic, but because, when you forget the answer and go to search for it again, it'll be way off here in this forum you'd never think to look for it. On Jun 28, 2013 8:44 PM, "David Fishburn" wrote: > Sorry to ask this here, it is just a terminal question, unrelated to Vim. > I don't subscribe to anything Linux related. > > On most of my machines that I ssh into (usually from either a Cygwin > Terminal or Putty) and I type a command and hit the up arrow, I get my > command back. > > When I launch a console application where I can type a command, think an > Interactive SQL console application where I would type: > SELECT * FROM T1 > > Though 2 different servers I connect to which always show ^[[A instead of > the previous command and I have to re-type my command. > > Yet on other servers, the same program, the up arrow shows the previous > command. > > Most of my Google searches say TERM is responsible, but xterm and screen I > assume are Ok. Other says to use bash, which I am. > > Not really sure what to check for. > > If I exit the application and hit the up arrow I get back my command which > launched the program. > > Anyway, I grab the ENV output hoping this might be enough for someone to > give me suggestions. > > One of the server is running SUSE Enterprise. > > > > ENV in a Cygwin Terminal > > TERM=xterm > SHELL=/bin/bash > HISTSIZE=1000 > SSH_TTY=/dev/pts/1 > > LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: > EC2_HOME=/home/ec2 > INPUTRC=/etc/inputrc > PWD=/home/dfishbur > JAVA_HOME=/usr/java/default > LANG=en_US.UTF-8 > SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass > SHLVL=1 > HOME=/home/dfishbur > LOGNAME=dfishbur > CVS_RSH=ssh > LESSOPEN=|/usr/bin/lesspipe.sh %s > G_BROKEN_FILENAMES=1 > _=/bin/env > > > ENV from within SCREEN > > TERM=screen > SHELL=/bin/bash > HISTSIZE=1000 > SSH_TTY=/dev/pts/3 > USER=dfishbur > > LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35: > EC2_HOME=/home/ec2 > TERMCAP=SC|screen|VT 100/ANSI X3.64 virtual terminal:\ > :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\ > :cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\ > :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\ > :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\ > :li#60:co#146:am:xn:xv:LP:sr=\EM:al=\E[L:AL=\E[%dL:\ > :cs=\E[%i%d;%dr:dl=\E[M:DL=\E[%dM:dc=\E[P:DC=\E[%dP:\ > :im=\E[4h:ei=\E[4l:mi:IC=\E[%d@:ks=\E[?1h\E=:\ > :ke=\E[?1l\E>:vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\ > :ti=\E[?1049h:te=\E[?1049l:us=\E[4m:ue=\E[24m:so=\E[3m:\ > :se=\E[23m:mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:ms:\ > :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\ > :vb=\Eg:G0:as=\E(0:ae=\E(B:\ > > :ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:\ > :po=\E[5i:pf=\E[4i:Z0=\E[?3h:Z1=\E[?3l:k0=\E[10~:\ > :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\ > :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:\ > :F2=\E[24~:F3=\EO2P:F4=\EO2Q:F5=\EO2R:F6=\EO2S:\ > :F7=\E[15;2~:F8=\E[17;2~:F9=\E[18;2~:FA=\E[19;2~:kb=:\ > :K2=\EOE:kB=\E[Z:kF=\E[1;2B:kR=\E[1;2A:*4=\E[3;2~:\ > :*7=\E[1;2F:#2=\E[1;2H:#3=\E[2;2~:#4=\E[1;2D:%c=\E[6;2~:\ > :%e=\E[5;2~:%i=\E[1;2C:kh=\E[1~:@1=\E[1~:k
Re: Linux shell command line editing/movement
Yes, zsh has decent vim bindings. Advanced things like *-into (ci, di, yi) aren't there but *-until (ct, dt, yt) and F/f are so it's just a few more key strokes. Also, it's not hard to yank your current command into vim (good for saving and eval $(cat ) reuse stuff). On May 22, 2013 10:46 AM, "Lucas Tadeu Teixeira" < lucas.tadeuteixe...@gmail.com> wrote: > If you're a zsh user you can use "bindkey -v". > > Paul wrote: > > > Is there a plugin that changes shell command line movement and editing > to those used in vim? For example, instead of ^a, be able to use 0; or > > instead of ^e be able to use $. > > > > Thanks > > > > Paul > > 2013/5/22 Adrian Luff : > > You mean besides "set -o vi"? > > > > -Adrian > > > > On May 21, 2013, at 8:12 PM, "Paul" wrote: > > > > Is there a plugin that changes shell command line movement and editing to > > those used in vim? For example, instead of ^a, be able to use 0; or > > instead of ^e be able to use $. > > > > Thanks > > > > Paul > > > > -- > > -- > > You received this message from the "vim_use" maillist. > > Do not top-post! Type your reply below the text you are replying to. > > For more information, visit http://www.vim.org/maillist.php > > > > --- > > You received this message because you are subscribed to the Google Groups > > "vim_use" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to vim_use+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > > > > > > > -- > Lucas Tadeu Teixeira > Computer Science > University of Campinas - Unicamp > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
vim taking focus
This happens on quite a few linux windows managers but I'm not discounting something outside of vim being at fault here - vim is the only place I've experienced this. I have a gvim session with: gvim --servername $USER and then I load new files with: vim --servername $USER and gvim will pop up into focus but generally my cursor will stay on the command line. I thought I had asked this before, so I googled and found quite a few (not my) posts: http://objectmix.com/editors/149356-gvim-window-not-given-focus-when-loading-file.html http://vim.1045645.n5.nabble.com/raising-gvim-window-to-front-td1169442.html https://groups.google.com/forum/#!msg/vim_use/r4NKUumRrqE/rZN3U-Xv5ZsJ http://mail.xfce.org/pipermail/xfce/2006-January/016091.html --remote-tab Also (might be a different issue) - when I open a file and a file has changed (the one I'm opening or one in another tab) like after a git checkout and vim is confused and asks me what to do, vim won't maintain focus after I deal with the dialog. If none of this is clear or reproducable, I'll look into a perltk test case. I have a script in my zshrc to automate this: # make vim use or initialize a session with a new tab unless... # alias this so that we can do \vim to get to the exe vimfunc () { local cmd local servername local remote local misc local version local username=$(echo $USER | tr "[:lower:]" "[:upper:]") local opt_ex="^-" while [ $# -gt 0 ] ; do case "$1" in --servername) if [[ $2 =~ $opt_ex ]] ; then echo "Servername option without a parameter. Doing nothing." return else servername="$2" shift fi ;; --remote*) if [ -z $remote ] ; then if [[ $2 =~ $opt_ex ]] ; then remote="$1" else remote="$1 $2" shift fi else # I'll deal with this properly if it is reasonable to take multiple --remote* things echo "Should not call two remote options at once. Doing nothing." return fi ;; --version*) version="1" ;; *) misc="$misc $1" ;; esac shift done cmd="vim" if [ ! -z $servername ] ; then cmd="$cmd --servername $servername" else cmd="$cmd --servername $username" fi if [ -z $misc ] && [ -z $remote ] ; then # list version if we asked for that if [ ! -z version ] ; then cmd="$cmd --version" fi ${=cmd} return fi if [ ! -z $remote ] ; then cmd="$cmd $remote $misc" else cmd="$cmd --remote-tab $misc" fi echo $cmd ${=cmd} return } -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: increment list
Thanks y'all. I'm not sure which I like better. (probably the simple function though) -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
increment list
Quite often I've got a list, either: 1 - do this first 2 - do this next 3 - go home or /^ ([0-3][0-9])- # 0 Day ([A-Z][a-z][a-z])- # 1 Month ([0-9]{4})# 2 Year /x; And I alter something and need to change the list. I can make a macro where I 'j0cw' or 'f#wcw' but then how do I make the incrementing work? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: tab order
heh, now I feel stupid. thanks On Wed, Feb 27, 2013 at 9:54 AM, Christian Brabandt wrote: > On Wed, February 27, 2013 15:45, shawn wilson wrote: >> How do i change the order of tabs? I don't see any other way but >> closing it and opening a buffer in a newly created tab? I guess I >> could create / find a script that would splice -1 and splice 1 the tab >> where i wanted it by moving buffers around - did I miss something? Is >> there an internal vim command to do this? >> > > Are you looking for > :tabmove > ? > > regards, > Christian > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
tab order
How do i change the order of tabs? I don't see any other way but closing it and opening a buffer in a newly created tab? I guess I could create / find a script that would splice -1 and splice 1 the tab where i wanted it by moving buffers around - did I miss something? Is there an internal vim command to do this? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: which file is being edited?
I forgot about C-G - thanks On Mon, Feb 18, 2013 at 4:23 AM, Jürgen Krämer wrote: > > :echo expand('%:p') This is what I'm looking for. Now to associate it with an F key or leader decisions -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
which file is being edited?
How do I get the full path of the file I'm editing? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: edit a register
Thanks y'all. I guess no direct way to do what I want, but I guess I can live with :let @r = ' ctrl+r ctrl+r + ' On Mon, Feb 11, 2013 at 11:23 AM, Marcin Szamotulski wrote: > On 10:35 Mon 11 Feb , shawn wilson wrote: >> Is there any way to edit a register? >> >> Sometimes I copy something with a return in it into "+ or I realize I >> put too much/little into a macro and would be nice to go and tweak it. >> :reg just lets me see things but not edit. Any ideas? >> > > If you'd rather use a named register like "a rather than "+, > then if you copy to "A you actually append to the content of "a. See > ':help quotea' which has a better wording :). > > Best regards,, > Marcin > > -- > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > > --- > You received this message because you are subscribed to the Google Groups > "vim_use" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to vim_use+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
edit a register
Is there any way to edit a register? Sometimes I copy something with a return in it into "+ or I realize I put too much/little into a macro and would be nice to go and tweak it. :reg just lets me see things but not edit. Any ideas? -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_use" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Vim Accidental Encryption - Am I SOL?
On Fri, Dec 14, 2012 at 9:32 AM, donothing successfully wrote: > > Is it not 96^4 possibilities? A much smaller number: ~85 million. > A quicker and dirtier approach might suffice. > God, that's not the first time I've messed up basic algebra. I've got to do better about that. You're right of course - base is possibilities, exponent is length. The easy way of checking this is abc length of 2: aa, ab, ac, ba, bb, bc, ca, cb, cc = 9 or 3^2. > Or you could try to socially engineer yourself, a tired vimmer might have the > capslock on and type ':X' instead of ':x' and not notice the prompts, > so it might > be worth trying ':X', ':x' or similar. > Modern hardware and brute force would have two symbols done in less than a second. If this is what the password, just start by brute forcing it and if it doesn't find anything after a minute or so, go to a dictionary (or rainbow table if there's a common hashing algorithm). And I feel I'm heading into OT territory for this list here :) I would like to hear the outcome of the OP's file (or process) though? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
restore
if i haven't saved the session, is there a way to get vim to restore back to the way it was (before a system crash?) if not is there a setting to get it to autosave session info? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim Accidental Encryption - Am I SOL?
On Sun, Dec 9, 2012 at 7:42 AM, Christian Brabandt wrote: > Possibly you can write a script, that feeds various combinations to vim > and checks, whether the file got decrypted. That sounds like a fun > exercise. > Don't write a script to do this. Don't use vim to test the crypt. I had a brief thought about writing a simple c program but here's the thing, If you can download a program that goes through x passwords per second and your program goes through x-100 passwords per second, and you're looking at a length of only 4 with ~96 keyboard keys, you're looking at 4^96 possibilities. So do the math for the difference that can make. If an optimized script does 1 million per second and your does 999,999,000 per second - and that's .01% of a difference in algorithm - you're liable to be much worse. So basically, figure out the algorithm, find a program that brute forces it (preferably utilizing your GPU), make a test file with vim, encrypt it with some short non-word phrase (say "q9") and run the cracker on that. If it works - should take a few seconds, you'll know you're good to run it on your actual file (or a backup of it). Run it and walk away. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim Accidental Encryption - Am I SOL?
On Sun, Dec 9, 2012 at 8:24 AM, Bram Moolenaar wrote: > > Bruce Leeroy wrote: > >> Somehow on exiting Vim I managed to set a password with Encryption On >> resulting in this: >> http://i.minus.com/i0EtLG3ZGp0H7.jpg >> >> Outside of somehow remember what I hit when exiting the program I am >> screwed huh? > well, if your password is <8 characters, you should be able to break it in a week or so (or look at amazon or other external sources). 9 characters gets to be a little harder. but you're talking brute force - this isn't a hash so a rainbow table isn't going to do you any good. also, if you use a weak schema, that's good (your brute force will be able to go through more passwords per second). chances are you're done, but maybe not > Your best bet is to find a backup file. If you don't use backup files > an undelete program might help find the deleted temp file. But if you > did further work on the partition it might already be lost. > There might also be a deleted swap file that you can recover from. > so, according to the below link (or what i extract from skimming it) is that the whole buffer is unencrypted in memory. so, if you haven't closed the vim session (just the buffer) getting it out of memory shouldn't be that hard. if you've closed it, dump your ram to a file and search for words (probably egrep [a-zA-Z0-9]* and go through it until you find something that looks familiar - better if you know a contiguous sentence you had). if it's been a day or maybe even a few hours, good luck with this as well. you've probably got multiple gigs of ram, so your dump will be multiple gigs - you'll want to limit how much of the file vim loads at once. oh, and if you've rebooted, discard this paragraph. > If you have persistent undo enabled you can get bits of text from the > undo file. > according to this, the undo won't help either (it's encrypted as it should be): http://vim.wikia.com/wiki/Encryption -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: configure
btw, i figured out that i didn't have headers installed for perl right after i send that. however, i still think the configure should fail if you specify something be enabled that can't be. On Wed, Dec 5, 2012 at 3:48 AM, shawn wilson wrote: > how does the build configuration script work. ie, i do this: > ./configure --with-features=huge --enable-gui=gnome2 > --enable-luainterp=yes --enable-perlinterp=yes > --enable-pythoninterp=yes --enable-tclinterp=yes > --enable-rubyinterp=yes > > (no, i didn't need all of those features but i couldn't enable ruby > and perl so i wanted to see what would be enabled) i don't even have a > lua interpreter installed but the configuration script quietly goes > along like everything is fine. even the build succeeds, but things > that i specified aren't all enabled. why doesn't the config or the > build process fail based on this, why are things that i have installed > not being enabled (perl and ruby)? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
configure
how does the build configuration script work. ie, i do this: ./configure --with-features=huge --enable-gui=gnome2 --enable-luainterp=yes --enable-perlinterp=yes --enable-pythoninterp=yes --enable-tclinterp=yes --enable-rubyinterp=yes (no, i didn't need all of those features but i couldn't enable ruby and perl so i wanted to see what would be enabled) i don't even have a lua interpreter installed but the configuration script quietly goes along like everything is fine. even the build succeeds, but things that i specified aren't all enabled. why doesn't the config or the build process fail based on this, why are things that i have installed not being enabled (perl and ruby)? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim + tmux with mouse support questions
i don't have a solution for you - I saw this same thing with tmux and found :res / :vertical resize or C-W -/+, , =/| actually worked faster anyway. more fluid too. so, if anyone has a solution, i'll probably use it just to be able to show off vim coolness with the mouse again, but it won't do anything for my productivity :) this is not (necessarily) an issue with putty as i use rxvt+u and screen-256color terminal also, this is with mouse=all with vim 7.3 i'm guessing this is a tmux issue where it is stealing whatever mouse terminal command or signal (i don't really know how mice interact with the terminal) vim would use to respond the way you want. if this is the case, and you get no working response, there's a tmux user list as well with a decent community you might look to. (though something like this should go in vim's faq somewhere) On Thu, Nov 29, 2012 at 6:51 PM, xiebo212 wrote: > Hi, > > I am pretty new for vim and tmux, and exploring right now. I have vim set up > on terminal (using putty) with mouse support, but when I moved to tmux. > Found a couple of problems. > > (1) I like quickfix window, use :ccopen to open quickfix window in vim, and > I can resize the quickfix window with mouse without any problem. But in tmux > + vim, mouse doesn't seem to work in resizing quickfix window (using mouse > to click into quickfix window is fine). Note that I was able to use mouse to > select/resize pan in tmux by the following settings. > set-option -g mode-mouse on > set-option -g mouse-select-pane on > set-option -g mouse-select-window on > set-option -g mouse-resize-pane on > > The problem here seems to be, how to enable mouse to resize a > window(quickfix window, NOT tmux window) inside one tmux pane. > > (2) I installed and enabled ctags and taglist in my vim setup. I can use > mouse to resize taglist window. But when I moved to tmux, taglist window can > still be opened and entered, but the window resize using mouse seems > disabled. This is similiar situation in quickfix window. > > Does anybody has an idea about how to fix these problems? I wish I can > entirely move to tmux using vim+mouse to improve productivity. > > Thanks a lot, > Bo > > > > -- > View this message in context: > http://vim.1045645.n5.nabble.com/Vim-tmux-with-mouse-support-questions-tp5712363.html > Sent from the Vim - General mailing list archive at Nabble.com. > > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: fold label
On Tue, Nov 13, 2012 at 7:16 PM, Christian Brabandt wrote: > Hi shawn! > > On Di, 13 Nov 2012, shawn wilson wrote: > >> On Tue, Nov 13, 2012 at 9:50 AM, Christian Brabandt >> wrote: >> > On Tue, November 13, 2012 10:33, shawn wilson wrote: >> >> is there a way to specify how a fold gets labeled? the default (of the >> >> first line with visible text is generally correct) but sometimes, my >> >> fold will start at a line with only /* or // or #. and a fold label >> >> with one of these is next to useless. >> >> >> > See >> > :h 'foldtext' >> > :h fold-foldtext >> > >> >> per foldtext - >> Leading white space, "//" or "/*" and the text from the 'foldmarker' >> and 'commentstring' options is removed. >> >> i have: >> let perl_fold=1 " Perl >> and try: >> autocmd FileType perl set commentstring='# %s' >> >> but, this doesn't seem to do anything. >> >> also, it seems i was wrong about // - that does seem to work correctly in js > > I am not sure, what you are trying to do here. if i do something like this in perl code: ### # useless comment # ### and the line of #s is the first line of the fold, vim does: +-- 3 lines: ##-- which is, of course, next to useless. > But here is an example of > how I customize my folded text. It is based on an idea by Greg Sexton > mentioned at > http://www.gregsexton.org/2011/03/improving-the-text-displayed-in-a-fold/ > thanks. i think i'll have the same display issue i'm currently having. however i think i can change this: getline(fs) =~ '^\s*$' to something like: getline(fs) =~ '^[^#\\ ]*$' and that might work. either way, i think i can see how to make it work with that. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: fold label
On Tue, Nov 13, 2012 at 9:50 AM, Christian Brabandt wrote: > On Tue, November 13, 2012 10:33, shawn wilson wrote: >> is there a way to specify how a fold gets labeled? the default (of the >> first line with visible text is generally correct) but sometimes, my >> fold will start at a line with only /* or // or #. and a fold label >> with one of these is next to useless. >> > See > :h 'foldtext' > :h fold-foldtext > per foldtext - Leading white space, "//" or "/*" and the text from the 'foldmarker' and 'commentstring' options is removed. i have: let perl_fold=1 " Perl and try: autocmd FileType perl set commentstring='# %s' but, this doesn't seem to do anything. also, it seems i was wrong about // - that does seem to work correctly in js -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
fold label
is there a way to specify how a fold gets labeled? the default (of the first line with visible text is generally correct) but sometimes, my fold will start at a line with only /* or // or #. and a fold label with one of these is next to useless. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: ruler / statusline
On Mon, Nov 5, 2012 at 3:03 AM, Ben Fritz wrote: > On Friday, November 2, 2012 5:11:04 PM UTC-5, shawn wilson wrote: >> On Fri, Nov 2, 2012 at 9:31 PM, Taylor Hedberg wrote: >> >> > set laststatus=2 >> >> >> >> is there a way i can do this without taking up another line? i mean, >> >> the position data disappears when i am in command mode, can i have the >> >> laststatus=1 and have the whole thing disappear when in command mode? >> > > Maybe you want to use 'ruler' and 'rulerformat' instead of laststatus=2? I'm > confused by your question, though. You asked originally how to get the > statusline to show up when you only have one document. Now you want it to > show up, but also not show up. What is it that you actually want? > i want a status bar that doesn't take up an extra line. so, basically something that takes up the line where i enter commands and goes away when i enter commands. rulerformat almost does what i want but it seems to only allow 18 characters in that space. it's not that big of a deal, i just like the information statusline gives but want the extra line of real estate. >> and, what is making vim change the bottom laststatus when i split? > > What do you mean "change the bottom laststatus"? Are you talking about the > color of the statusline changing in non-active windows? Or something else? > idk what i was talking about. i seem to remember the bottom statusline moving up when i split. but i can't reproduce it - so either i was seeing things, insane, or too tired (probably all of the above). -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: ruler / statusline
On Fri, Nov 2, 2012 at 9:31 PM, Taylor Hedberg wrote: > set laststatus=2 is there a way i can do this without taking up another line? i mean, the position data disappears when i am in command mode, can i have the laststatus=1 and have the whole thing disappear when in command mode? and, what is making vim change the bottom laststatus when i split? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
ruler / statusline
it seems that the statusline doesn't show up when i'm only dealing with one document. i see the line count and the likes. but not the full statusline. what am i missing? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: buffers in splits
On Tue, Oct 9, 2012 at 9:39 PM, Ben Fritz wrote: > On Tuesday, October 9, 2012 4:23:38 PM UTC-5, shawn wilson wrote: >> >> what i generally do is have a split (window?) that i want to toggle >> between two files in, but if i have two other files i want to toggle >> between in another window, this becomes an issue as i need to remember >> my current place in the buffers and i can't just bn/bp . is there a >> way to do this? >> > > Each window has its own "alternate file" which you can switch between with > either: > > :b # i have no idea what that's doing. if i have only two files, b1 work. but, if i type b2, it opens up a new file, and if i hot ':' again, vim closes that split, and displays a part of the other file and i can't figure out how to get out of this. > or CTRL+^ (CTRL+6 on a QWERTY keyboard) in normal mode. that does what i want. thanks -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
buffers in splits
is there a way to change the buffer position based on what file you're editing? what i generally do is have a split (window?) that i want to toggle between two files in, but if i have two other files i want to toggle between in another window, this becomes an issue as i need to remember my current place in the buffers and i can't just bn/bp . is there a way to do this? if not (i've seen this question posted but can't find it) - how do i figure out which window i'm in so that i buffer list use to reorder buffers with? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Using :sh
Probably not what you're looking for, but if you use tmux, bind sh to split-window (something or another - not at a computer) and use vimux to deal with buffers. On Sep 27, 2012 1:32 PM, "David Ohlemacher" wrote: > > They do indeedthanks. > > -d > > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: autochdir vs command-t
On Mon, Sep 17, 2012 at 3:34 PM, Ben Fritz wrote: > On Sunday, September 16, 2012 8:46:42 PM UTC-5, Tony Mechelynck wrote: > > On 16/09/12 22:46, shawn wilson wrote: > > > > > On Sun, Sep 16, 2012 at 6:38 PM, Tony Mechelynck > > > > > wrote: > > > > >> On 16/09/12 20:08, shawn wilson wrote: > > > > >>> > > > > >>> i like autochdir so that i can easily rename files and :E stuff where > > > > >>> i am. but, then if i use command-t again, it is limited to the > current > > > > >>> directory. how do i make the pwd of certain commands the path vim was > > > > >>> opened in and the pwd of another set of commands the pwd of the file > > > > >>> of the current buffer? > > > > >>> > > > > >> > > > > >> What about not using 'autochdir' but > > > > >> > > > > >> :lcd %:h > > > > >> > > > > > > > > > > that's not a bad solution. is there a way of getting the directory > > > > > where i opened vim back? so, basically some way of toggling between > > > > > the path of the file and the path i opened vim in? i could map it to > > > > > an f-key and be fine with that... > > > > > > > > > > > > > Hm... I thought there was a way to unset the lcd (like there are ways to > > > > set a local option back to the global setting, or any option to the Vi > > > > or Vim default), but I can't find it in the help. So here's a > > > > workaround, to be added to your vimrc > > > > > > > > either (F5 to toggle) > > > > > > > > let curdir = getcwd() > > > > map :if getcwd() == curdir lcd %:h else > exe > > > > 'lcd' curdir endif > > > > > > > > or (F5 to set, Shift-F5 to clear) > > > > > > > > let curdir = getcwd() > > > > map :lcd %:h > > > > map :exe 'lcd' curdir > > > > > > > > Note that :lcd %:h while "editing a directory" with netrw will set the > > > > current directory to the _parent_ of the directory being displayed. Use > > > > :lcd % (which doesn't work when editing a file) to set it to that > > > > directory itself. > > > > I read through the command-t docs because I thought maybe it had an option > to search the 'path' instead of only the current directory. It doesn't, but > the plugin DOES allow for specifying the top-level path. > > So to simplify, you could do something like this instead: > > let s:cmdt_root = getcwd() > map :exe 'CommandT' s:cmdt_root huh, must've missed that (though i'd've failed on the script before this exchange anyway) but, now that it's done, i sorta like the manual toggle solution. i don't think i want that option taken away now that i have it :) -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: autochdir vs command-t
On Mon, Sep 17, 2012 at 7:57 AM, Christian Brabandt wrote: > On Mon, September 17, 2012 08:40, shawn wilson wrote: >> On Mon, Sep 17, 2012 at 1:46 AM, Tony Mechelynck >> wrote: >>> On 16/09/12 22:46, shawn wilson wrote: >>>> >>>> On Sun, Sep 16, 2012 at 6:38 PM, Tony Mechelynck >>>> wrote: >>>>> >>>>> On 16/09/12 20:08, shawn wilson wrote: >>>>>> >>>>>> >>>>>> i like autochdir so that i can easily rename files and :E stuff where >>>>>> i am. but, then if i use command-t again, it is limited to the >>>>>> current >>>>>> directory. how do i make the pwd of certain commands the path vim was >>>>>> opened in and the pwd of another set of commands the pwd of the file >>>>>> of the current buffer? >>>>>> >>>>> >>>>> What about not using 'autochdir' but >>>>> >>>>> :lcd %:h >>>>> >>>> >>>> that's not a bad solution. is there a way of getting the directory >>>> where i opened vim back? so, basically some way of toggling between >>>> the path of the file and the path i opened vim in? i could map it to >>>> an f-key and be fine with that... >>>> >>> >> >>> either (F5 to toggle) >>> >>> let curdir = getcwd() >>> map :if getcwd() == curdir lcd %:h else >>> >>> exe 'lcd' curdir endif >>> >> >> thanks for that. though, for some reason, it is erroring: >> >> Error detected while processing /home/swilson/.vimrc: >> line 74: >> E475: Invalid argument: curdir = getcwd() >> Press ENTER or type command to continue >> >> while i found this >> (http://vimdoc.sourceforge.net/htmldoc/map.html#) i was unable to >> figure out what the issue is. > > Replace the by g: > that works. thanks if anyone comes googling later, this is what i ended up with: let g:curdir = getcwd() map :if getcwd() == g:curdir lcd %:h else exe 'lcd' g:curdir endif -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: autochdir vs command-t
On Mon, Sep 17, 2012 at 1:46 AM, Tony Mechelynck wrote: > On 16/09/12 22:46, shawn wilson wrote: >> >> On Sun, Sep 16, 2012 at 6:38 PM, Tony Mechelynck >> wrote: >>> >>> On 16/09/12 20:08, shawn wilson wrote: >>>> >>>> >>>> i like autochdir so that i can easily rename files and :E stuff where >>>> i am. but, then if i use command-t again, it is limited to the current >>>> directory. how do i make the pwd of certain commands the path vim was >>>> opened in and the pwd of another set of commands the pwd of the file >>>> of the current buffer? >>>> >>> >>> What about not using 'autochdir' but >>> >>> :lcd %:h >>> >> >> that's not a bad solution. is there a way of getting the directory >> where i opened vim back? so, basically some way of toggling between >> the path of the file and the path i opened vim in? i could map it to >> an f-key and be fine with that... >> > > either (F5 to toggle) > > let curdir = getcwd() > map :if getcwd() == curdir lcd %:h else > exe 'lcd' curdir endif > thanks for that. though, for some reason, it is erroring: Error detected while processing /home/swilson/.vimrc: line 74: E475: Invalid argument: curdir = getcwd() Press ENTER or type command to continue while i found this (http://vimdoc.sourceforge.net/htmldoc/map.html#) i was unable to figure out what the issue is. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: autochdir vs command-t
On Sun, Sep 16, 2012 at 6:38 PM, Tony Mechelynck wrote: > On 16/09/12 20:08, shawn wilson wrote: >> >> i like autochdir so that i can easily rename files and :E stuff where >> i am. but, then if i use command-t again, it is limited to the current >> directory. how do i make the pwd of certain commands the path vim was >> opened in and the pwd of another set of commands the pwd of the file >> of the current buffer? >> > > What about not using 'autochdir' but > > :lcd %:h > that's not a bad solution. is there a way of getting the directory where i opened vim back? so, basically some way of toggling between the path of the file and the path i opened vim in? i could map it to an f-key and be fine with that... -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
autochdir vs command-t
i like autochdir so that i can easily rename files and :E stuff where i am. but, then if i use command-t again, it is limited to the current directory. how do i make the pwd of certain commands the path vim was opened in and the pwd of another set of commands the pwd of the file of the current buffer? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
error message issue
so, i go to open a file: :o t2.pl E37: No write since last change (add ! to override) ok, fine: :o! t2.pl E477: No ! allowed so, what is the issue and shouldn't the error be better / more descriptive? -- Shawn Wilson 703-517-1201 -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: shell in a window
I saw the plugin but no patch...? I guess I was hooping there was some command I counsel map or something. I mean a file explorer but no shell... On Jun 7, 2012 9:00 AM, "Ben Fritz" wrote: > On Thursday, June 7, 2012 3:02:28 AM UTC-5, shawn wilson wrote: > > how do i get a shell prompt in a window? ! executes commands, and > > :shell gives me a temporary shell. but i can't figure out how to get > > the prompt in a window. > > You mean an internal Vim window? You need a plugin or a patch for that. > The one I know about is Conque: > http://www.vim.org/scripts/script.php?script_id=2771 > > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
shell in a window
how do i get a shell prompt in a window? ! executes commands, and :shell gives me a temporary shell. but i can't figure out how to get the prompt in a window. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Lost file using Vim (first time ever in 15 years)
This sounds sane. On May 15, 2012 11:20 AM, "Ben Fritz" wrote: > On Tuesday, May 15, 2012 2:49:38 AM UTC-5, JohnBeckett wrote: > > To reproduce problem: > > > > 1. Create file bad.tmp by executing the following line. > > :call writefile(["Very important file \x8D"], 'bad.tmp') > > > > 2. Start Vim editing the file and enter commands, as below. > > vim -N -u NONE bad.tmp > > :set fenc=cp857 > > What if, right here, Vim were to check the buffer contents to see if all > characters in the file can actually be converted to the new fenc setting, > and issue a warning if not? It's not something Vim does currently...but I > don't see why it couldn't. And I'd like to know if I do something stupid > *when I do it*, not when I try to write the file and end up killing my file. > > > :set nobackup nowritebackup > > :w > > > > 3. Observe message which you have probably never seen before: > > "bad.tmp" E513: write error, conversion failed > > (make 'fenc' empty to override) > > WARNING: Original file may be lost or damaged > > don't quit the editor until the file is successfully written! > > > > 4. Panic and do what has always worked in the past: > > :q! > > > > Right, to me, :q! means "oh crap I didn't mean to do that, GET ME OUT!" > > > Result: > > - Step 2 replaces bad.tmp with an empty file. > > - The original contents have been lost. > > > > The "no backup" options cause Vim to overwrite the existing > > file. However, the write aborts when the conversion fails, > > resulting in lost data. > > > > While a user should not turn off backups on an important file, > > it is a horrible trap that one incorrect byte can effectively > > delete a file. > > > > A message like the following might help: > > > > "bad.tmp" E513: write error, conversion failed > > WARNING: The file on disk has probably been corrupted. > > Do not quit until the file is successfully written! > > Try saving it again after entering (nothing after "="): > > :set fenc= > > > > I haven't done more than glance at Christian Brabandt's patch > > so I don't know what is achievable. Would something as simple > > as checking the number of bytes in the file on disk be > > sufficient to decide if corrective action is needed? > > > > John > > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php > -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Lost file using Vim (first time ever in 15 years)
On May 13, 2012 9:00 AM, "Toddintr" wrote: > > Also, I did not think that q! would result in any change to the file since the last write. This is against user expectations. > If this is true, this is quite odd... -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Lost file using Vim (first time ever in 15 years)
On May 13, 2012 8:53 AM, "A.M. Sabuncu" wrote: > > I never read the warning. Much like no one reads the manual. I never thought I would *ever* encounter anything with Vim that would lead to losing a file. > Ok, I don't run windows so when I get a message I *read* it. If the message happens to repeat, I figure out how to disable it. You've never encountered anything in VI that makes you loose a file? Huh, I do it all the time. Process: vim somefile, start typing, ah I don't like that filename, :q! and that data is gone. I don't even get a warning. /me omits sarcastic thoughts Also, you use VI without reading the manual? That's impressive. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Lost file using Vim (first time ever in 15 years)
On May 13, 2012 7:53 AM, "Toddintr" wrote: > > WARNING: Original file may be lost or damaged > don't quit the editor until the file is successfully written! (In orange) > Press ENTER or type command to continue (in green) > > What I meant by bad design decision: When the conversion fails, why not simply restore the previous buffer? The unacceptable behaviour is that even if I do a "q!", I still lose the file. > So you get a warning about loosing data if you quit, quit anyway, and complain that you lost data? Interesting. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim manual
On Tue, Apr 10, 2012 at 16:30, Andre Majorel wrote: > Sure. Here's what I have : > > http://www.teaser.fr/~amajorel/vimpspp/ > is that what was used to create this: http://vimdoc.sourceforge.net/ -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: Vim manual
I think beautifying vimdoc would be a good thing (though I don't really dig the dead tree version). I think maybe even expanding it so that it's more book like (maybe with examples from the list / web) might even be a good thing. I think a starting point would be to decide on a document format (tex probably?) and a conversion process so that the book is easily updated with the upstream? ... and a git for this to live (someone's github probably). I worry about the process of design by committee though... if I have a pull request where I use some font, who decides if its good or not? On Apr 10, 2012 12:36 PM, "Phil Dobbin" wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 10/04/2012 16:59, Andre Majorel wrote: > > > On 2012-04-05 22:32 +0100, Phil Dobbin wrote: > > > >> There doesn't seem to have been much of a positive response however to > >> the idea in general so taking that into account if the vim list is > >> ambivalent towards it, I'm not so sure it'll pan out with anyone else. > >> > >> It wouldn't take an Everest type effort to typeset it to a degree (Lulu > >> accept pdf files) & it should, of course, look as well set as possible. > > > > A straight conversion to PostScript of the help files would not > > be very difficult but it wouldn't be very good either. > > > > I've written a hack that darkens the colours and replaces the > > default font by something less rotten than courier (my beef is > > not with the fixed spacing, it is with that particular font). > > > > psbind -2 to print 2-up (4 pages per sheet). > > > > To do : a form-feed per chapter, global page numbering and > > everything else I'm forgetting. Maybe a page number after each > > link but that would mean reflowing. > > > > The manual is not very useful without the reference, IMO. > > > > I've also been looking at Pandoc (been pretty busy of late so haven't > had much time). > > I'm still very keen on the idea however so if you want maybe we can pool > resources (along with anybody else of course)? > > Cheers, > > Phil... > > - -- > But masters, remember that I am an ass. > Though it be not written down, > yet forget not that I am an ass. > >Wm. Shakespeare - Much Ado About Nothing > > > -BEGIN PGP SIGNATURE- > Version: GnuPG/MacGPG2 v2.0.17 (Darwin) > Comment: §auto-key-locate cert pka ldap hkp://keys.gnupg.net > Comment: GPGTools - http://gpgtools.org > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEcBAEBAgAGBQJPhGGbAAoJEKpMeDHWT5ADcJQH/1txoH3bveWjzqf1zV0gwl9x > gvOjKVtlR6Xj1cEjKQD77+ZCMYR6MwcTdCgEmZA7TnIxzjf9UYkgBvSXkUhzF3xe > 0EUINaz2KtBWVrhFa0apjoSKa265GgUhb1WDJyiqshAafmOvyMKmdnUu4B5YAbW+ > EcQ9kmr8nevPkZpquvwSh3voOgnIMQd4T4zNQhzFWhCz7uQiLi+NgF1mDfHweq7L > yHW/x5rRA6WMqOVHrIfFDwi7T5zMHKhDrFaD5kZpXxqmkG5tbD/ELZ9CwSgO1dip > PSuRxux2XINzcjV2mbixtV0SlQtBeAUE/IeEOYOpo4U7hr1fCSWDTriJhmUiMKs= > =olUF > -END PGP SIGNATURE- > > -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
deselect select area
often, i want to indent every line except two or three lines somewhere in the middle of the selection. so, i have to enter visual select mode, do what i need, and repeat the process. is there a way to not select a line in either block or line visual mode? -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
search replace function
quite often, i want to write a test with a static file (html in this instance). and i'd like to search and replace with random data. how do i do this? %s/thing/!cat /dev/urandom | strings | tr -d "\n" | head -c 15/gc where 'cat /dev/urandom | strings | tr -d "\n" | head -c 15' is a unix command (though, if vi has a rand(), i could use that as well) -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: jumping position
ty On Fri, Dec 2, 2011 at 10:23, György Kiss wrote: > CTRL-O > :help CTRL-O > > On 2011.12.02., at 16:20, shawn wilson wrote: > >> is there a way to go back to the previous position in a file? >> something like a history for the cursor position? >> >> i generally put markers in files when i'm looking for things, but >> sometimes forget to do 'ma', 'mb' etc and then might forget what i >> called it, but if there was a way to say, go where i was in a file 4 >> jumps ago (by jumps, i mean 'gd', ':-100', '/blah', etc) that would be >> cool >> >> -- >> You received this message from the "vim_use" maillist. >> Do not top-post! Type your reply below the text you are replying to. >> For more information, visit http://www.vim.org/maillist.php > > -- > You received this message from the "vim_use" maillist. > Do not top-post! Type your reply below the text you are replying to. > For more information, visit http://www.vim.org/maillist.php -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
jumping position
is there a way to go back to the previous position in a file? something like a history for the cursor position? i generally put markers in files when i'm looking for things, but sometimes forget to do 'ma', 'mb' etc and then might forget what i called it, but if there was a way to say, go where i was in a file 4 jumps ago (by jumps, i mean 'gd', ':-100', '/blah', etc) that would be cool -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
Re: vim slow running latex files
On Nov 29, 2011 12:32 AM, "Jonatas Eduardo Cesar" wrote: > > However, when I'm try to edit .tex files it presents two problems which seem related. First, vim starts to work really slow, and second, when I press "any letter" + , > it tries to auto-complete with words previously written in the text. > First try turning off syntax hilighting. That is probably the speed issue. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php