Re: Searching for selected text
Bram Moolenaar wrote: Sometimes people ask me for a command to search for the text that is currently visually selected. You could add a mapping for the '/' key, but then you lose the possibility to extend the visual area by searching for a pattern. Since we might need more commands in Visual mode later, and we only have a few keys left to be used, we need to use two key combinations for new commands in Visual mode. I think we can start using the '&' key. Currently it doesn't do anything. For now we could add the commands: &/ search for the Visually selected text forward &? same, backward Is there a good alternative? & does do something, but maybe we can do without that, since ":s//~/" does the same (repeat last substitute without the flags) -- it needs six keystrokes instead of one though. Best regards, Tony.
gvim segfaulting on Solaris 10
Hi all, I built vim 7.0.110 on Solaris 10 U1 x86, fully patched, using Sun Studio 11 or Solaris' GCC 3.4.3. Building went fine, however, test 16 failed (no output). What happens is that gvim fails on startup with a segfault: $ gvim GTK Accessibility Module initialized Bonobo accessibility support initialized Vim: Caught deadly signal SEGV Vim: Finished. Segmentation Fault (core dumped) Just running vim works: $ vim ~ VIM - Vi IMproved ~ ~ version 7.0.110 I built it using a very simple configuration: export PATH=/usr/bin:/usr/ccs/bin:/opt/SUNWspro/bin LDFLAGS='-L/usr/sfw/lib -R/usr/sfw/lib' \ ./configure --prefix=/opt/vim-7.0.110 \ --enable-multibyte And here's the pstack of the core if it can be useful: $ pstack core.vim.14541 core 'core.vim.14541' of 14541: gvim fd1b0557 kill (82ba9cc, 815c0b0, 1, 82bd2e8, 0, 0) + 7 081c183a mch_exit (1) + 8a 0815c0b0 getout (1) + 210 08185884 preserve_exit (8, 82ba9fc, fd1afd8f, b, 0, 82baa8c) + c4 081bfa19 (b, 0, 82baa8c) fd1afd8f __sighndlr (b, 0, 82baa8c, 81bf880) + f fd1a6355 call_user_handler (b, 0, 82baa8c) + 22b fd1a64d5 sigacthandler (b, 0, 82baa8c) + bb --- called from signal handler with signal 11 (SIGSEGV) --- fcfdf908 FcHideFont (83ff0e8, 8429280, 8429268, 80468e0) + d8 fcfe0979 FcFontSetSort (83f8be0, 804695c, 1, 83f5d58, 1, 0) + 1c9 fcfe0d1a FcFontSort (83f8be0, 83f5d58, 1, 0, 80469a8, 83f5d58) + ca fd6e8043 pango_fc_font_map_get_patterns () + 157 Any idea what's going wrong? Would it be a vim or a Solaris GNOME issue? Thanks in advance for any hint! Laurent
Re: Searching for selected text
Yakov Lerner wrote: > On 9/30/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: > > > > Sometimes people ask me for a command to search for the text that is > > currently visually selected. You could add a mapping for the '/' key, > > but then you lose the possibility to extend the visual area by > > searching for a pattern. > > > > Since we might need more commands in Visual mode later, and we only have > > a few keys left to be used, we need to use two key combinations for > > new commands in Visual mode. > > > > I think we can start using the '&' key. Currently it doesn't do > > anything. For now we could add the commands: > > > > &/ search for the Visually selected text forward > > &? same, backward > > > > Do you plan to treat visual selection as pattern, or a literal text-to > search ? Literal text would be most useful. For a pattern I would expect it to be more useful to copy it from one file (e.g., help text or a Vim scrip) and search for it in another file. -- CRONE: Who sent you? ARTHUR: The Knights Who Say GNU! CRONE: Aaaagh! (she looks around in rear) No! We have no licenses here. "Monty Python and the Holy editor wars" PYTHON (MONTY) SOFTWARE LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Recording of Vim BOF session
The audio recording of the Vim BOF session at the euroOSCON is now available: ftp://ftp.vim.org/pub/vim/stuff/20060919_BOF.wav ftp://ftp.vim.org/pub/vim/stuff/20060919_BOF.mp3 The size of the .wav is 17 Mbyte. It's a 8000 Hz mono recording. The .mp3 file is about half that size and still sounds about the same. The most notable subjects discussed: 0:00: Introduction by Bram: a bit of history, Vim 7 release, current situation 0:10: GUI Tab pages labels: more control over color/bold/etc/ of the text 0:13: file changed outside of Vim 0:23: undo tree view; search in text saved for undo 0:28: Perl integration: Vim functions in Perl directly 0:38: there are 3 match items only, need more 0:47: viper mode 0:48: seven habits of effective text editing 0:55: vertical folds 1:02: formatting text 1.10: the killer feature Enjoy! -- FIRST VILLAGER: We have found a witch. May we burn her? "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Searching for selected text
On 9/30/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: Sometimes people ask me for a command to search for the text that is currently visually selected. You could add a mapping for the '/' key, but then you lose the possibility to extend the visual area by searching for a pattern. Since we might need more commands in Visual mode later, and we only have a few keys left to be used, we need to use two key combinations for new commands in Visual mode. I think we can start using the '&' key. Currently it doesn't do anything. For now we could add the commands: &/ search for the Visually selected text forward &? same, backward Do you plan to treat visual selection as pattern, or a literal text-to search ? Yakov
Re: Searching for selected text
On 9/30/06, Georg Dahn <[EMAIL PROTECTED]> scribbled: Hi! Bram Moolenaar wrote: > &/ search for the Visually selected text forward > &? same, backward > > Is there a good alternative? I think, this is ok. For the moment I have the following lines ... vnoremap * VisualSearch('*') vnoremap # VisualSearch('#') I also use 'vmap * ...' and 'vmap # ...' to search for text that is visual selection.In my mapping, all special chars in visual selection are quoted to make them literal. I think there can be two variants for search for visual selection: 1) treat visual selection as pattern 2) treat visual selection as literal text Yakov
Re: Convert2HTML Again
On 26/09/06, Edd Barrett <[EMAIL PROTECTED]> wrote: Ill add this in as soon as I can, but university work is coming in hard at the moment so it might not be until the weekend. Greetings all, Hope your enjoying your weekend. As promised i have ammended the patch. I have run some tests as before and uploaded them (along with the new patch) here: http://arameus.net/users/edd/vim-test2/ All of the files with _courier.html as a suffix are with a font set using :let html_font="courier". This sets all css/font tags to this font and appends ", monospace" as a fallback incase the user does not have that font. Also i realized that style= in a body tag is css and replaced that with a big old font tag around the whole text if html_use_css is not set. Best Regards Edd
Re: Searching for selected text
On 9/30/06, Bram Moolenaar <[EMAIL PROTECTED]> wrote: "g/" is scheduled to be used to search inside the selected area Hehe, I was just about to ask if such a command wouldn't be useful :-) nikolai
Re: Searching for selected text
Matt Mzyzik wrote: > I don't like this one more, but it's a good alternative: > g/ > g? > > Also, I feel that one day "&" might do something in visual; at least > visual line mode. "g?" is already used for rot13 encoding. "g/" is scheduled to be used to search inside the selected area -- Eye have a spelling checker, it came with my PC; It plainly marks four my revue mistakes I cannot sea. I've run this poem threw it, I'm sure your please to no, It's letter perfect in it's weigh, my checker tolled me sew! /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Searching for selected text
I don't like this one more, but it's a good alternative: g/ g? Also, I feel that one day "&" might do something in visual; at least visual line mode. --Matt On Sat, Sep 30, 2006 at 01:37:59PM +0200, Bram Moolenaar wrote: > > Sometimes people ask me for a command to search for the text that is > currently visually selected. You could add a mapping for the '/' key, > but then you lose the possibility to extend the visual area by > searching for a pattern. > > Since we might need more commands in Visual mode later, and we only have > a few keys left to be used, we need to use two key combinations for > new commands in Visual mode. > > I think we can start using the '&' key. Currently it doesn't do > anything. For now we could add the commands: > > &/ search for the Visually selected text forward > &? same, backward > > Is there a good alternative? > > -- > Any resemblance between the above views and those of my employer, my terminal, > or the view out my window are purely coincidental. Any resemblance between > the above and my own views is non-deterministic. The question of the > existence of views in the absence of anyone to hold them is left as an > exercise for the reader. The question of the existence of the reader is left > as an exercise for the second god coefficient. (A discussion of > non-orthogonal, non-integral polytheism is beyond the scope of this article.) > (Ralph Jennings) > > /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ > ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ > \\\download, build and distribute -- http://www.A-A-P.org/// > \\\help me help AIDS victims -- http://ICCF-Holland.org///
Re: Searching for selected text
Hi! Bram Moolenaar wrote: &/ search for the Visually selected text forward &? same, backward Is there a good alternative? I think, this is ok. For the moment I have the following lines in my vimrc file (I found the original code in a vim tip): --- 8< --- " Search in Visual and Selection modes with '*' and '#' function MakeSearchString(str) return substitute(escape(@", '\\/.*$^~[]'), '\n', '\\n', 'g') endfunction function! VisualSearch(direction) if a:direction == '#' let l:rhs = "y?" else let l:rhs = "y/" endif let l:rhs = l:rhs . "^RMakeSearchString(@\")^M^MgV" return l:rhs endfunction vnoremap * VisualSearch('*') vnoremap # VisualSearch('#') --- 8< --- (The ^R and ^M are special chars) This does the job for me and I think, that these mappings are rather consistent with the rest of Vim, since they just expand the behavior of * and #. What exactly do you plan? Which new features shall we expect? Best wishes, Georg ___ Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html
Searching for selected text
Sometimes people ask me for a command to search for the text that is currently visually selected. You could add a mapping for the '/' key, but then you lose the possibility to extend the visual area by searching for a pattern. Since we might need more commands in Visual mode later, and we only have a few keys left to be used, we need to use two key combinations for new commands in Visual mode. I think we can start using the '&' key. Currently it doesn't do anything. For now we could add the commands: &/ search for the Visually selected text forward &? same, backward Is there a good alternative? -- Any resemblance between the above views and those of my employer, my terminal, or the view out my window are purely coincidental. Any resemblance between the above and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader. The question of the existence of the reader is left as an exercise for the second god coefficient. (A discussion of non-orthogonal, non-integral polytheism is beyond the scope of this article.) (Ralph Jennings) /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\download, build and distribute -- http://www.A-A-P.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org///