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

Problem with "vim -A txt"

Expand Messages
  • Rudolf Bahr
    Hello *, I m new to vim. Occasionally I d like to write Arabic texts. When doing vim -A txt ( txt being a new, not existing file), all seems to be at its
    Message 1 of 4 , Apr 28, 2009
    • 0 Attachment
      Hello *,

      I'm new to vim. Occasionally I'd like to write Arabic texts.

      When doing "vim -A txt" ("txt" being a new, not existing file),
      all seems to be at its best: The cursor is in the upper right
      corner of the monitor. After going into the enter mode by "i"
      there can be read in the lower left corner:
      "-- EINFÜGEN Arabisch --" (which means -- ENTERING Arabic --)

      But then I explicitly have to enter ":set arabic" in order to enter
      Arabic characters, otherwise there would appear latin characters.
      Why? I did invoke vim with the option "-A"!

      Then in Arabic mode: Though the cursor is going one position to
      its left, the second Arabic character is NOT adjusted at the left
      side of the first or the following ones, vim writes the Arabic
      characters in left to right mode!

      After doing ":set rl" or ":set rightleft" or "set: arabicshape"
      nothing happens. vim continues writing from left to right.

      Please, what should I do? Reading Arabic from left to right is
      not really what an Arab is amused about.

      In the following is my "vim --version". "Riesige Version ohne GUI" means
      "Giant version without GUI". Up to now there is no "$VIM/vimrc",
      "$HOME/.vimrc" nor "$HOME/.exrc".

      Best regards,
      Rudolf



      --------------------------------------------------------------------
      carlo@lena-maria:~$ vim --version
      VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 19 2009 03:44:45)
      Inklusive der Korrekturen: 1-148
      Übersetzt von buildd@...
      Riesige Version ohne GUI. Ein- (+) oder ausschließlich (-) der Eigenschaften:
      +arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
      -clientserver -clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
      +cryptv +cscope +cursorshape +dialog_con +diff +digraphs -dnd -ebcdic
      +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
      +float +folding -footer +fork() +gettext -hangul_input +iconv +insert_expand
      +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap
      +menu +mksession +modify_fname +mouse -mouseshape +mouse_dec +mouse_gpm
      -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm +multi_byte
      +multi_lang -mzscheme -netbeans_intg -osfiletype +path_extra -perl +postscript
      +printer +profile -python +quickfix +reltime +rightleft -ruby +scrollbind
      +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
      +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
      -toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
      +vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
      -xterm_clipboard -xterm_save
      System-vimrc-Datei: "$VIM/vimrc"
      Benutzer-vimrc-Datei: "$HOME/.vimrc"
      Benutzer-exrc-Datei: "$HOME/.exrc"
      Voreinstellung für $VIM: "/usr/share/vim"
      Übersetzt: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wall -g -O2
      Linken: gcc -Wl,--as-needed -o vim -lm -lncurses -lselinux -lacl -lgpm
      --------------------------------------------------------------------


      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • StarWing
      ... see :h ri --~--~---------~--~----~------------~-------~--~----~ You received this message from the vim_use maillist. For more information, visit
      Message 2 of 4 , Apr 28, 2009
      • 0 Attachment
        On 4月28日, 下午6时34分, Rudolf Bahr <bo...@...> wrote:
        > Hello *,
        >
        > I'm new to vim. Occasionally I'd like to write Arabic texts.
        >
        > When doing "vim -A txt" ("txt" being a new, not existing file),
        > all seems to be at its best: The cursor is in the upper right
        > corner of the monitor. After going into the enter mode by "i"
        > there can be read in the lower left corner:
        > "-- EINFÜGEN Arabisch --" (which means -- ENTERING Arabic --)
        >
        > But then I explicitly have to enter ":set arabic" in order to enter
        > Arabic characters, otherwise there would appear latin characters.
        > Why? I did invoke vim with the option "-A"!
        >
        > Then in Arabic mode: Though the cursor is going one position to
        > its left, the second Arabic character is NOT adjusted at the left
        > side of the first or the following ones, vim writes the Arabic
        > characters in left to right mode!
        >
        > After doing ":set rl" or ":set rightleft" or "set: arabicshape"
        > nothing happens. vim continues writing from left to right.

        see :h 'ri'
        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Rudolf Bahr
        ... Hello Weasley, thank you for answering! I tried :set ri and it worked, but a little bit laborious, in that the cursor remains at the right edge of the
        Message 3 of 4 , Apr 30, 2009
        • 0 Attachment
          * StarWing (weasley_wx@...) [090429 07:12]:
          >
          > see :h 'ri'



          Hello Weasley,

          thank you for answering! I tried ":set ri" and it worked, but a little bit
          laborious, in that the cursor remains at the right edge of the monitor and
          shows the next character which will be adjusted at the left side of the text
          after entering another next character at cursor's place. It's somehow like
          a conductor who must always be in front of his orchestra by 1 time.

          In the meantime I installed gvim (GTK2 GUI) and after:

          gvim -A txt
          :set arabic

          all works perfectly well as expected! vim and gvim seem here to react differently.

          Best regards, Rudolf


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Tony Mechelynck
          ... With revins set, I expect Vim will insert the characters in the wrong sequence into your buffer, i.e., the last character of the word will be first in
          Message 4 of 4 , May 1, 2009
          • 0 Attachment
            On 30/04/09 10:30, Rudolf Bahr wrote:
            >
            > * StarWing (weasley_wx@...) [090429 07:12]:
            >>
            >> see :h 'ri'
            >
            >
            >
            > Hello Weasley,
            >
            > thank you for answering! I tried ":set ri" and it worked, but a little bit
            > laborious, in that the cursor remains at the right edge of the monitor and
            > shows the next character which will be adjusted at the left side of the text
            > after entering another next character at cursor's place. It's somehow like
            > a conductor who must always be in front of his orchestra by 1 time.
            >
            > In the meantime I installed gvim (GTK2 GUI) and after:
            >
            > gvim -A txt
            > :set arabic
            >
            > all works perfectly well as expected! vim and gvim seem here to react differently.
            >
            > Best regards, Rudolf

            With 'revins' set, I expect Vim will insert the characters in the wrong
            sequence into your buffer, i.e., the last character of the word will be
            first in the buffer, which means the Arabic will be displayed correctly
            in 'norightleft' mode in Vim, but if the same file is viewed by, let's
            say, a browser (all modern browsers are bidi-capable), the Arabic will
            appear reversed.

            If the text gets inserted the wrong way in a terminal, but not in gvim,
            with 'rightleft' on and 'revins' off, it may mean that you are running
            on a full-bidi terminal. In that case you should set 'termbidi' and not
            'rightleft' (see ":help 'termbidi' for details).

            Of course, the GUI is not a full-bidi terminal, and you may be running
            Console Vim on the same machine on different terminals, some of them
            full-bidi and others not, so you should test all that in your vimrc,
            something like:

            if !has('gui_running') &&
            \ (&term == 'blablabli' || &term == 'blablabla')
            set termbidi norightleft
            endif


            Best regards,
            Tony.
            --
            hundred-and-one symptoms of being an internet addict:
            22. You've already visited all the links at Yahoo and you're halfway through
            Lycos.

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          Your message has been successfully submitted and would be delivered to recipients shortly.