Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When pressing w or e in sentences with accents (written in my native language), such as the first one (marked **) here:

**Éj-mélyből fölzengő**
- csing-ling-ling - száncsengő.
Száncsengő - csing-ling-ling -
tél csendjén halkan ring.          [1]

the characters ő, ö, among others [2], make my gVim think they are word-ends so it stops on them (in Normal mode). gVim stops on the positions marked with _ where it shouldn't:

Éj-mélyb_ől f_ölzeng_ő.

I would like to set gVim so it properly handle words even when containing accents and other local characters. But where do I set this?

I use it on Win32, vim v 7.3.46.


appendix credit & version & info

[1] - excerpt of a poem by Weöres Sándor

[2] - "others", not mentioned here :) like í, ű are also a problem. On the other hand, gVim seems to already work with é and á.


gVim version info:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Oct 27 2010 17:59:02)
Included patches: 1-46
Compiled by Bram@KIBAALE
Big version with GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
+digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
+file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input
+iconv/dyn +insert_expand +jumplist +keymap +langmap +libcall +linebreak
+lispindent +listcmds +localmap -lua +menu +mksession +modify_fname +mouse
+mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole
-osfiletype +path_extra +perl/dyn +persistent_undo -postscript +printer
-profile +python/dyn +python3/dyn +quickfix +reltime +rightleft +ruby/dyn
+scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop
+syntax +tag_binary +tag_old_static -tag_any_white +tcl/dyn -tgetent
-termresponse +textobjects +title +toolbar +user_commands +vertsplit
+virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu
+windows +writebackup -xfontset -xim -xterm_save +xpm_w32
share|improve this question
    
What is the output of :set encoding?, :set fileencoding?, :set fileencodings?? I can do bwe just fine in your example with :set encoding=utf-8. –  romainl Jun 8 '12 at 9:10
    
all encodings were cp1250, except fileencodings what is still ucs-bom,utf-8,default,latin1. I set encoding=utf-8, reloaded the file (the encoding change first got it messed up) and now it works. Thanks! :) I'm newbee. :) Would you like to add it as answer so I could accept it? –  naxa Jun 8 '12 at 9:20
    
by the way, what happens here? (when vim "goes wrong" with those accented chars in cp1250?) –  naxa Jun 8 '12 at 10:07

1 Answer 1

up vote 5 down vote accepted

What is the output of these commands?

:set encoding?
:set fileencoding?
:set fileencodings?

I can do bwe just fine in your example with :set encoding=utf-8.

Ideally, you could add set encoding=utf-8 to your _VIMRC.

share|improve this answer
    
encodings were cp1250, except fileencodings what was (still is) ucs-bom,utf-8,default,latin1. Then set encoding=utf-8 solved the problem, thanks! :) ps. Don't forget to reload the file / vim. ;) –  naxa Jun 8 '12 at 10:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.