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

Explanations of my mail "Some bugs, drawbacks and wishes"

Expand Messages
  • Pavel A. Papushev
    These are some explanations of my previous mail on 12/07/2002 ( Some bugs, drawbacks and wishes ) ... First of all, I want to say that I hate special cases !!!
    Message 1 of 1 , Dec 8, 2002
      These are some explanations of my previous mail on 12/07/2002
      ("Some bugs, drawbacks and wishes")

      About 1) :
      First of all, I want to say that I hate special cases !!!

      At present, when you enter 'normal' mode from 'insert' mode by
      pressing <ESC> the cursor is shifted left, but if you enter only for
      one command (<C-O>), it does not occur. This is a special case. :-(

      There are following lines in getchar.c:
      /* (line 2153)
      * get a character: 3. from the user - handle <Esc>
      * in Insert mode
      /* move cursor left, if possible */ (line 2208)
      if (curwin->w_cursor.col != 0)
      What is the reason for this? Why do you move cursor?

      About 2)
      At present, in 'normal' mode you cannot place cursor in the end of
      nonempty line, only one character before!(Why?!) But, you can do it on
      empty line. This is a special case. :-(

      About 1) and 2) in more detail:
      I like toggle-keys for switching between two states. I want to use
      <Esc> as the toggle between insert/normal modes.
      I do not want to write
      :map <Esc> a
      because, in this case, in 'normal' mode I cannot press <Esc>, i.e.
      'a', to insert text into the start of line when cursor is there. I
      have to press <Ins> (or 'i'). And this is a special case. :-(

      Therefore, I could use
      :map <Esc> <Ins>
      This solves the problem in start of line but creates problem in the
      end of line. At present, in 'normal' mode cursor cannot be placed at
      the end of line, only one character before the end (I don't
      understand, what is the reason for this?). So, I can't press <Esc>
      (=<Ins>) at the end of line. I have to press 'a' here. But this is a
      special case. :-(

      And so, finally, I wrote
      :set virtualedit=all
      :noremap <End> <End><Right>
      :map <Esc> <Ins>
      I do not want 'virtualedit'=all, but I have to. :-( Now I can switch
      between insert/normal modes by pressing <Esc> without depending on
      position on a line. But problem of shifting cursor is still here! :-(
      If I want to write imap to highlight an inner word under cursor, I
      have to make corrections (<Right>) of cursor position (for the case,
      when cursor is on first character of the word):
      :imap <F3> <Right><Esc>viw
      (Here I can use <C-o> instead of <Right><Esc>, but there are many
      situations when several commands are required.)
      Because such correction is repeated very often, I do not want that
      <Esc> can shift cursor. In addition, common sense tells me, that when
      I enter 'normal' mode, I only want to enter 'normal' mode, but not
      moving the cursor!

      Therefore, I wrote
      :inoremap <Esc> <Right><Esc>
      This solves this problem, but creates other one. In this case, I
      cannot use <Esc>5<Ins>Hello<Esc> to insert 'Hello' five times. And I
      cannot use 'I' and 'A' in 'visual block' mode. (If you write
      :inoremap <Esc> <Esc><Right>, cursor will be shifted to the right
      after pressing <Esc> then cursor is placed in the start of line)

      Therefore, I have to write
      :inoremap <S-Esc> <Esc><Right>
      and use <S-Esc> instead of <Esc> in these cases. But, this is a
      special case :-(

      I understand that I can use p, P, gp and gP. But I don't want it!
      Other editors allow having one keystroke to paste text, and it is
      enough. However, I use VIM and I want be able to use only <S-Ins>:
      :map <S-Ins> "*gP
      But in the end of line this works only when 'virtualedit'=all. This
      is a special case :-(

      To sum up, these two "features" (1 - shifting cursor after <Esc>,
      2 - inability in 'normal' mode to place cursor in the end of line)
      create very many problems and special cases! I realize that there are
      many existing mappings and habits of other users. But, would you
      create some option for deleting such behavior?

      About 3) :
      I use GVIM 6.1 for MS Windows and I wrote :set winaltkeys=no. I want
      to be able to use following mappings:

      :map <C-D> iC-S-d was pressed!<Esc>
      :map <C-A-d> iC-A-d was pressed!<Esc>
      :map <C-A-D> iC-A-S-d was pressed!<Esc>
      :map <A-d> iA-d was pressed!<Esc>
      :map <A-D> iA-S-d was pressed!<Esc>

      :map <C-1> iC-1 was pressed!<Esc>
      ... ...
      :map <C-9> iC-9 was pressed!<Esc>
      :map <C-.> iC-. was pressed!<Esc>
      :map <C-'> iC-' was pressed!<Esc>
      :map <C-$> iC-S-4 was pressed!<Esc>
      :map <C-%> iC-S-5 was pressed!<Esc>
      ... ...

      But I can't use it. :-( Why?

      About 4):
      Almost all other editors calculates the range of a horizontal
      scrollbar from the length of the longest line in a file. But GVIM
      calculates it from length of the current line. :-( Why?

      About 5):
      When I do vertical scrolling and click on fold-mark on gutter(fold
      column), fold is opend in such a manner, that the last line of fold is
      shown near the position of the click. :-( In all other cases the first
      line is shown and that's right!

      About 6) :
      All menus with switching function (such as
      'Edit/File Settings/Shiftwidth', 'Tools/Folding/Fold column width')
      have no mark about the current chosen item. :-(

      About 7) :
      I can use abbreviations like ":iab if #if<CR><CR>#endif". But I would
      like to use abbreviations like
      :iab #if #if<CR><CR>#endif
      :iab if if()<CR>{<CR><CR>}
      I cannot use first one without adding # to 'iskeyword'. :-(
      Would you optionally use all characters before the cursor
      right up to space as an abbreviation (in the moment of expansion)?
      It is not possible (without mapping) to expand abbreviation if you
      shift cursor somewhere and then return it to abbreviation. :-(

      About 8):
      In "usual command line" I cannot select and copy text to clipboard (on
      MS Windows) and cannot use commands of 'normal' mode. In "command line
      window" I can do it, but I cannot see "wildmenu". (It's possible to
      use completion, but "wildmenu" is not shown) and I continue to see
      "usual command line". Would you create an option to use
      "command line window" with "wildmenu" on the last line of the screen
      instead of "usual command line"?

      About 9):
      Would you optionally to do so that help buffers was not deleted from
      menu "Buffers" after switching(in the same window) to other usual buffer.

      Best regards,
      Pavel Papushev.
    Your message has been successfully submitted and would be delivered to recipients shortly.