DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 6th May 2011
Daffy Daffy is offline
Fdisk Soldier
 
Join Date: Jun 2010
Posts: 73
Thanked 0 Times in 0 Posts
Default How to use gvim with greek letters?

First of all, I didn't know in which sub-forum to put this. Hope it's the right place...

For some days now, I'm trying to find info in how to enable greek typography in gvim*.

It seems now that I can write in Greek in browsers and LibreOffice after a small modification in xorg.conf under input method:

Code:
Option "XkbLayout" "us, gr"
Option "XkbOptions" "grp:ctrl_shift_toggle"
and fixed the bug in the symbols with

Code:
cd /etc/X11/xkb/symbols/pc/
sudo ln -s gr el
But now I'm somehow stuck. I know that OpenBSD since 4.8 accepts unicode, but from further reading I see that to display a single character, I have to do a certain key combination. For some letters, it's okay. For a big text, it's painful... Is there any way to just change language and start typing in gvim.

*The only reason that I say gvim and not vim, is that because as a gtk application, I suppose that it will be easier...

Can someone provide more info?
Reply With Quote
  #2   (View Single Post)  
Old 7th May 2011
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

Quote:
Originally Posted by Daffy View Post
and fixed the bug in the symbols with

Code:
cd /etc/X11/xkb/symbols/pc/
sudo ln -s gr el
After creating these links and running the following, I can switch between Greek and English with Ctrl-Shift. Works fine in an xterm.

$ setxkbmap -layout us,gr -option grp:ctrl_shift_toggle

This command translates identically to the config snippet you posted.
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.

Last edited by backrow; 7th May 2011 at 05:39 PM.
Reply With Quote
  #3   (View Single Post)  
Old 7th May 2011
Daffy Daffy is offline
Fdisk Soldier
 
Join Date: Jun 2010
Posts: 73
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by backrow View Post
After creating these links and running the following, I can switch between Greek and English with Ctrl-Shift. Works fine in an xterm.

$ setxkbmap -layout us,gr -option grp:ctrl_shift_toggle
hm... it seems that I'm getting the same results as before. While I can write fine in English, in Greek I get an angry beep tone when I try to type a letter and I get no output...

[edit]:

Here's a screenshot. The first line is proper English, the second is Greek.

Name:  gvim.png
Views: 216
Size:  11.9 KB

Last edited by Daffy; 7th May 2011 at 08:24 AM.
Reply With Quote
  #4   (View Single Post)  
Old 7th May 2011
graudeejs's Avatar
graudeejs graudeejs is offline
Real Name: Aldis Berjoza
formerly killasmurf86
 
Join Date: Jul 2008
Location: Riga, Latvia
Posts: 588
Thanked 29 Times in 26 Posts
Default

I think you need to map your Greek bindings to vim functions.

If you don't want that, in insert mode you could use this:
http://www.vim.org/scripts/script.php?script_id=2469

also check this out
http://vimdoc.sourceforge.net/htmldo...n.html#Russian


finally make sure you use UTF-8 encoding


Reply With Quote
  #5   (View Single Post)  
Old 7th May 2011
Daffy Daffy is offline
Fdisk Soldier
 
Join Date: Jun 2010
Posts: 73
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by killasmurf86 View Post
I think you need to map your Greek bindings to vim functions.

If you don't want that, in insert mode you could use this:
http://www.vim.org/scripts/script.php?script_id=2469

also check this out
http://vimdoc.sourceforge.net/htmldo...n.html#Russian


finally make sure you use UTF-8 encoding


I thank you so much... Problem solved with translit plugin and ":set encoding=utf-8".
Reply With Quote
  #6   (View Single Post)  
Old 7th May 2011
backrow backrow is offline
Real Name: Anthony J. Bentley
Shell Scout
 
Join Date: Jul 2009
Location: Albuquerque, NM
Posts: 116
Thanked 10 Times in 4 Posts
Default

Quote:
Originally Posted by killasmurf86 View Post
I think you need to map your Greek bindings to vim functions.

If you don't want that, in insert mode you could use this:
http://www.vim.org/scripts/script.php?script_id=2469

also check this out
http://vimdoc.sourceforge.net/htmldo...n.html#Russian
The problem with these methods is they only work within Vim, and not when you need to use foreign characters in other terminal applications.

The method I posted above works for me, and I don’t know why it wouldn’t work for you. Maybe you have LC_CTYPE set incorrectly—should be “en_US.UTF-8”.

Of course, you should be using “set encoding=utf-8” inside Vim. That is right.
__________________
Many thanks to the forum regulars who put time and effort into helping others solve their problems.
Reply With Quote
Reply

Tags
greek, gvim

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Ping Torture of Tantalus" - A Greek tragedy exposing ARP and DNS J65nko Guides 0 6th May 2008 10:44 PM


All times are GMT. The time now is 04:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick