On 15/07/09 12:21, mobi phil wrote: > By the way: you don't have to start coding this thing in c > You can write this in some vim script lines (however it'll start > searching after pressing enter and not on the fly) > > Hehe ... incremental search is the pareto 10% of perfection in search :) > without incremental > search one can do the job, but in huge texts you are much less productive > > >By the way: Have a look at :h pattern. > >There is \s and \S and such which makes life easier.. > I know I know... but wanted to put bit more weight to what I was > presenting :) > > >>Try this: > > >>noremap <F11> :call<space>feedkeys('/'.substitute(input('smart > search'),'\(\S\+\)\s*','\\<\1\\S*\\>\\s*','g').nr2char(10))<cr> > > >>Another tip: If you're trying to match text within a block. Don't search > >>for "If you're" but try "'re t" or "ch te" instead of "match text". > >>In most cases this is uniq enough. > I know, I do it generally like that. However I work every day with 5 > european languages, often > pure my soul I am confused about the spelling of a word, so the trick > above does not work. > The other problem is that I have to work/mainly read text with umlaut > (German, Hungarian) or > other hierogliphs like in French, Romanian, Spanish. I do not have these > characters on the dvorak > keyboard so smart searching for a sequence of the characters would help > a lot. (and I am sure not > only me)
Maybe the "accents" keymaps would help you. After ":set keymap=accents", hit 'e for e-acute, `o for o-grave, :u for u-umlaut, ^i for i-circumflex, 'c for c-cedilla, ~n for n-tilde, etc. Romanian (t-cedilla, s-cedilla, etc.) doesn't seem to be included, also not Hungarian (double-acute-accented vowels), the Latin-Slavic (Polish l-bar, Czech, Slovak, Croatian consonants with acute or caron), the Scandinavian languages (o-slash, ae-digraph, a-ball, edh, thorn), Catalan (l with middle dot) or Esperanto (consontants with circumflex, u-breve) but once you've understood how the system works, save the keymap under another name in ~/.vim/keymap (Unix) or ~/vimfiles/keymap (Windows) and edit it there. Use Ctrl-^ (in Insert/Replace or Command-line mode) to toggle the keymap on and off. Also: * searches forward for the word under the cursor # searches backward for the word under the cursor q/ and q? open the search history in a window (where you may do any edits without leaving the window; Enter executes the line under the cursor as a search command and closes the search history; :q closes it without any other action and goes back to where you were before) Best regards, Tony. -- Expense Accounts, n.: Corporate food stamps. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---