Re: Redefining paragraph text object?
On 09/22/12 12:04, Gary Johnson wrote: > I think that's what's addressed by this todo item: > > - Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. > Combine the two into a regex for searching. (Ned Konz) I knew I'd seen something like this on the horizon. I'm just surprised that it hadn't already landed—it's one of those sore spots I've grumbled about since the 5.x days 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
Re: Redefining paragraph text object?
On 2012-09-22, Christian Brabandt wrote: > Hi Gary! > > On Fr, 21 Sep 2012, Gary Johnson wrote: > > > On 2012-09-21, Silas Silva wrote: > > > Hello all. > > > > > > I was working around a function to map } and { around it. It is useful > > > for file formats that have other definitions of paragraph other than ^$. > > > For DocBook, for instance, it is better to use "" and "". > > > > > > So I thought: it works for navigation, but not for all other operations > > > regarding paragraph text object. Would it be possible to change > > > paragraph text object for my own needs? > > > > > > There is the 'paragraphs' option, but it look too simple, not accepting > > > regexp. I couldn't extend it far from the basic nroff setting. > > > > > > Is it possible? > > > > No. > > Not built in, but you can of course map { } to something different. > There are several text-object motion scripts at vim.org, this one here > seems to specifically take care of paragraph motion: > http://www.vim.org/scripts/script.php?script_id=3952 > > Disclaimer: I don't know the plugin and can't say how well it will work > in your case. Mappings will work to change the behavior of { and }, but by "other operations regarding paragraph text object," I assumed the OP was referring to commands using ap and ip. There is no way that I know of to change the behavior of commands using those. I think that's what's addressed by this todo item: - Add regex for 'paragraphs' and 'sections': 'parare' and 'sectre'. Combine the two into a regex for searching. (Ned Konz) Regards, Gary -- 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: Redefining paragraph text object?
Hi Gary! On Fr, 21 Sep 2012, Gary Johnson wrote: > On 2012-09-21, Silas Silva wrote: > > Hello all. > > > > I was working around a function to map } and { around it. It is useful > > for file formats that have other definitions of paragraph other than ^$. > > For DocBook, for instance, it is better to use "" and "". > > > > So I thought: it works for navigation, but not for all other operations > > regarding paragraph text object. Would it be possible to change > > paragraph text object for my own needs? > > > > There is the 'paragraphs' option, but it look too simple, not accepting > > regexp. I couldn't extend it far from the basic nroff setting. > > > > Is it possible? > > No. Not built in, but you can of course map { } to something different. There are several text-object motion scripts at vim.org, this one here seems to specifically take care of paragraph motion: http://www.vim.org/scripts/script.php?script_id=3952 Disclaimer: I don't know the plugin and can't say how well it will work in your case. regards, Christian -- Menschen, die immer daran denken, was andere von ihnen halten, wären sehr überrascht, wenn sie wüßten, wie wenig die anderen über sie nachdenken. -- Bertrand A. W. Russell -- 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: set mouse=a and copy paste
Hi Gelonida! On Fr, 21 Sep 2012, Gelonida N wrote: > So far I did not use > > :set mouse=a > > This sounds also an interesting option. > > However it has one drawback, which is, that whatever I select with a > mouse can no more be pasted to other windows. > > as using the mouse is now affecting the visual mode selection it > doesn't seem to populate the clipboard anymore. > > Would there be any trick to > set mouse=a , and still have the visual selection end up in the > clipboard or to be able to copy paset from another app? Have you tried this ,[ :h 'mouse' ]- | Note: When enabling the mouse in a terminal, copy/paste will use the | "* register if there is access to an X-server. The xterm handling of | the mouse buttons can still be used by keeping the shift key pressed. | Also see the 'clipboard' option. ` Also as mentioned see the help at :h 'clipboard regards, Christian -- Die große Notwendigkeit erhebt, die kleine erniedrigt den Menschen. -- Johann Wolfgang von Goethe (Riemer, Nov. 1803) -- 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 tabs nd ctrl-pgdn not working on cygwin cmd shell
Hi Gelonida! On Fr, 21 Sep 2012, Gelonida N wrote: > On most of my platforms I can use 'CTRL-Pgdn' to change tabs > > However this is not working on cygwin if started from a cmd (or an > rxvt-native) windows > If I start vim (not gvim) in an xterm CTRL-PgDn is working > > However in a cmd shell this keyboard combination seems to be ignored. > > Is Windows catching this combination? probably. > If yes, can I convince it to leave my cmd window alone? I don't know. I would simply map ctrl-pgdn to the function. You can wrap this map command into an if &term =~ 'rxvt' " your mapping here endif Mit freundlichen Grüßen Christian -- Wir dürfen jetzt nur nicht den Sand in den Kopf stecken. -- Lothar Matthäus -- 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: Colorschemes and split window
H On Monday, April 30, 2012 9:15:26 AM UTC-4, rameo wrote: > It seems that I have found the solution (after many many hours of trying :-( ) > > I created the function below. > The function must do this (and seems to do it): > > a) when there is only 1 window: > check if filetype is "vim" --> Dark_ColorScheme > if filetype is not "vim" --> Light_ColorScheme > b) when there is a split window: >check if exist split window colorscheme variable (g:splitcolor) >if yes, colorscheme of splitwindow = g:splitcolor > >when leaving split window: >keep the value of the current color in g:splitcolor > > Can anyone tell me if I made a mistake and if the function can be simplified? > > function SetColors() > if winnr('$') > 1 >if exists('g:splitcolor') > exe 'colors '.g:splitcolor >else > exe 'colors Light_ColorScheme' >endif > elseif winnr('$') == 1 && &ft == 'vim' > exe 'colors Dark_ColorScheme' > elseif winnr('$') == 1 && &ft != 'vim' > exe 'colors Light_ColorScheme' > endif > endfunction > function KeepColors() >if winnr('$') > 1 >let g:splitcolor = g:colors_name >endif > endfunction > augroup filetype_colorscheme > au BufEnter * call SetColors() > au BufLeave * call KeepColors() > augroup END Hi, I am trying to achieve similar goal, I want to have different color schemes for different file types, but I use omnicppcomplete, which opens a floating window for auto-completion. So, when I try to do the autocompletion, the whole color scheme reverts back to the default. Have you found any work around? -- 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: [msza...@gmail.com Re: a small plugin for :call system() in vim]
04:02 Sat 22 Sep , Tony Mechelynck wrote: > This is not to say that Martin's request would be invalid: it probably > isn't; it's just that I prefer it otherwise, and indeed AFAIK even > implementing Martin's proposal wouldn't force me to change my ways, thus > making us both happy. That's why I like it so much, some times I also prefer to run a command in a real shell (for example interactive ones requires that). Thank you Marc for the list of plugins, I have to look at them more closely. I added it as a plugin: http://www.vim.org/scripts/script.php?script_id=4224 and also I added a reference in Vim wiki: http://vim.wikia.com/wiki/Append_output_of_an_external_command (in the see also section) As for the history: it is enough to add "call histdel(':', -1)" to the command, i.e. :call system(cmd)|call histdel(':', -1) 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