Loading ...
Sorry, an error occurred while loading the content.

32878Foo.vim - mappings

Expand Messages
  • David Fishburn
    Oct 3 7:05 AM
    • 0 Attachment
      You might try the Count() function from foo.vim, quoted below.
      This will find only one match per line, though. If you want to count
      all matches, use a :while loop and the search() function.

      I downloaded foo.vim, since it had a number of functions that I would
      like to use (Mark, Count and so on).

      Unfortunately, I began to get some strange behaviour soon after I
      installed it.

      I use variable names like this: customer_name
      When I go into insert mode and type _ some nasty things where happening.

      I realized in foo.vim there is this line:
      " Change _foo_ into FOO on the fly, in Insert mode.
      " This version only works within one line.
      " It will not get confused if you switch bufffers before the second "_".
      :imap _ _<Esc>:call Capitalize()<CR>s
      fun! Capitalize()
      if exists("b:Capitalize_flag")
      unlet b:Capitalize_flag
      normal! vF_Ux,
      let b:Capitalize_flag = 1
      execute "normal! a_\<Esc>"

      Which explains my problems.

      Since foo.vim is meant to be part educational, is it possible to leave
      the mappings comment out or something. That way unsuspecting people do
      not run into problems (and can't figure it out).

      I really appreciate the plugin and the work it does.

      I simply commented out the mappings, I am just thinking about other
      users, who might spend sometime trying to figure out where the problem

      Just a comment, thanks for the plugin.

    • Show all 5 messages in this topic