Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
View Poll Results: What locale/codeset do you use?
|
UTF-8
|
|
73 |
85.88% |
ISO8859-1
|
|
9 |
10.59% |
Other ISO8859-*
|
|
2 |
2.35% |
Other
|
|
3 |
3.53% |
|
|
08-07-2014, 03:55 AM
|
#61
|
Moderator
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,293
|
Quote:
Originally Posted by WiseDraco
your russian looks far better than my english
long time not receive any mails from you
|
Спасибо!
Check your inbox!
I must go to bed now, very late - I write slowly in Russian!
I will look for your reply tomorrow, I hope!
Спокойной ночи!
Last edited by astrogeek; 08-07-2014 at 04:07 AM.
|
|
1 members found this post helpful.
|
08-07-2014, 05:29 AM
|
#62
|
Member
Registered: Aug 2012
Posts: 185
Rep:
|
I need Swedish, Norwegian, Danish and Icelandic UTF-8 symbols and sometimes some other languages. Slackware has been my main distribution since I tried it for the first time (14.0) and everything works well for me. I've had some affairs with other distributions but I always come back to Slackware, because everything just works, including UTF-8. Slackware supremacy.
"Just works" doesn't mean that it has to work out of the box. Considering that Slackware is a distribution that thinks the whole world consists of the USA and Europe might as well be the Moon (the moon of Jupiter, perhaps), it is not bad that you can get full UTF-8 support in the console and X with just a few tweaks that take less than 10 minutes:
# Manuals
In order to make UTF-8 work in manuals, I added this to my $HOME/.profile:
Code:
LESSCHARSET='utf-8'
export LESSCHARSET
GROFF_ENCODING='utf8'
export GROFF_ENCODING
I think this will break system manuals that use the Latin-[1-n] encodings. Latin-1 is not compatible with UTF-8. ASCII manuals work fine though since UTF-8 is backward compatible with ASCII. Existing manuals could be converted with iconv (even automatically), but I haven't run in to any problems yet.
# Console
The console doesn't display most common Latin-1 symbols. So I use ter-v16n.psf (Terminus 512 chars) in the console. You can set it in /etc/rc.d/rc.font. Although Unicode contains many more than 512 symbols, this font covers nearly all UTF-8 symbols that I use.
Note that there are small (256) and big (512) console fonts. Big console fonts break some colors and bold text, but it's totally worth it.
# vi
elvis doesn't handle UTF-8. The program seems to assume that all encodings use single chars, but UTF-8 is a multi-byte (multiple chars) encoding. When you insert a Euro symbol, it correctly displays the symbol but it also prints 2 spaces (the Euro symbol uses 3 bytes). This is really bad because you can add the required UTF-8 support in C using only the ANSI C89 standard library with the mb* functions. Therefore I have replaced it with ex-vi, which handles UTF-8 perfectly.
# Almquist shell
/bin/ash can't enter UTF-8 symbols. Try it:
Code:
ash
å # doesn't work!
exit
/bin/dash (Debian Almquist shell) on Debian and the Heirloom-sh both handle it. I wanted to use ash as an interactive shell (because /bin/sh on Slackware is bash), so I use the Heirloom-sh instead.
# Other
Other than that it works fine!
LANG, LC_CTYPE = en_US.UTF-8 (having Swedish system messages makes it really hard to find error messages with search engines)
LC_COLLATE = C (for sorting)
LC_MONETARY, LC_NUMERIC, LC_TIME = sv_SE.UTF-8 (for cal, date et c.)
# X
You can not live without the compose key. (You can enable it in the console too but that entails editing the keymap file; Debian has an excellent program -- ckbcomp -- that can create console keymaps from X keymaps, which you can then use on Slackware.) In X, I bind the Menu key to compose:
Code:
setxkbmap -option compose:menu
Last edited by Soderlund; 08-07-2014 at 05:30 AM.
|
|
7 members found this post helpful.
|
08-07-2014, 06:45 AM
|
#63
|
LQ Veteran
Registered: May 2008
Posts: 7,002
Original Poster
|
Nice post Soderlund, thankyou.
I'd already discovered some of what you posted (elvis/ash), but I'll take a look at ex-vi and the heirloom shell as alternatives.
Btw, I also have compose set to menu (does anyone actually ever use that key for anything else? )
On the console, I've found that pressing both alts together enables compose mode without any editing necessary, but it uses different character sequences to compose on X, which is awkward, so yes, some editing is going to be necessary if one wants it to be consistent. (ckbcomp sounds very useful here - again thanks for the tip).
|
|
|
08-07-2014, 04:04 PM
|
#64
|
LQ Veteran
Registered: May 2008
Posts: 7,002
Original Poster
|
Just installed and had a play with ex-vi. Seems to work nicely for both utf-8 and sbcs. Given that 'elvis' doesn't work with UTF-8, do people think it should be put out to pasture and either ex-vi, or vim be used as the default vi in slackware?
|
|
|
08-08-2014, 02:06 AM
|
#65
|
Member
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591
Rep:
|
Quote:
Originally Posted by astrogeek
Спасибо!
Check your inbox!
I must go to bed now, very late - I write slowly in Russian!
I will look for your reply tomorrow, I hope!
Спокойной ночи!
|
sorry for offtopic 2All !
Do you get my two mails? want to be sure, my mails reach you - i be almost sure, my mailserver not in any blackmail list, and also i have a SPF record, but - who knows?
|
|
|
08-08-2014, 02:27 AM
|
#66
|
Member
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 378
|
Quote:
Originally Posted by GazL
Just installed and had a play with ex-vi. Seems to work nicely for both utf-8 and sbcs. Given that 'elvis' doesn't work with UTF-8, do people think it should be put out to pasture and either ex-vi, or vim be used as the default vi in slackware?
|
In this regard ex-vi is definitely better than elvis, but it lacks some features that elvis provides (syntax highlighting, multiple buffers and windows to name a few). Although if one requires more features than what traditional vi has, then why not use vim? I think ex-vi and vim would be a good combo to cover all editing needs.
|
|
|
08-08-2014, 07:18 AM
|
#67
|
Member
Registered: Aug 2012
Posts: 185
Rep:
|
You are welcome.
There is one thing that I haven't figured out yet: Unicode compose. Some sources say that you can press Ctrl-Shift-U and enter a Unicode code point, but it doesn't work for me in the console or in X. I think it might be a GNOME or KDE thing.
Quote:
Originally Posted by GazL
Just installed and had a play with ex-vi. Seems to work nicely for both utf-8 and sbcs. Given that 'elvis' doesn't work with UTF-8, do people think it should be put out to pasture and either ex-vi, or vim be used as the default vi in slackware?
|
/usr/bin/vi is a symlink to elvis, and /usr/bin/ex is a symlink to vim. So ex-vi could even be included as /usr/bin/ex and /usr/bin/vi (-> ex) alongside elvis and vim.
|
|
|
08-08-2014, 07:46 AM
|
#68
|
Senior Member
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
|
Quote:
Originally Posted by GazL
Just installed and had a play with ex-vi. Seems to work nicely for both utf-8 and sbcs. Given that 'elvis' doesn't work with UTF-8, do people think it should be put out to pasture and either ex-vi, or vim be used as the default vi in slackware?
|
Did you get the Unix toolchest ex? I've been using that, off and on, for some years in Slackware and it's worked well for me with the UTF-8 locale (right now it's off).
I notice that stock Slackware symbolically links /usr/bin/ex to /usr/bin/vim and /usr/bin/vi to /usr/bin/elvis. This has worked pretty much OK for my editing needs and I haven't had any significant problems as a result. I would note that in a Unix system, ex is vi (with a symbolic link in, for example Solaris); vi is just ex in visual mode after all.
Personally, I don't particularly like what vim does with all the eye candy -- I find it annoying with all the colors and other features (and don't want to fiddle with shutting them off). I like simple. Others like all that stuff, that's why we have a choice, eh?
You could just link /usr/bin/vi to /usr/bin/ex and see what's what? You'd have vim and that might just work for you?
Hope this helps some.
|
|
1 members found this post helpful.
|
08-08-2014, 09:45 AM
|
#69
|
Member
Registered: May 2004
Distribution: BSD
Posts: 269
Rep:
|
Just for completeness, there is also nvi, which is the default vi on most BSD systems (that's where I've learnt about it). I use the git version, which has some important DB fixes; recent versions display Kuhn's Unicode sample files well in an uxterm, had no problems so far (font used: -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1). Some of its features (from NetBSD's documentation):
- Extended regular expressions (egrep style), enabled with option extended.
- Tag stacks.
- Infinite undo (to undo, press u; to continue undoing, press .).
- Incremental search, enabled with the option searchincr.
- Left-right scrolling of lines, enabled with the option leftright; the number of columns to scroll is defined by the sidescroll option.
- Command line history editing, enabled with the option cedit.
- Filename completion, enabled by the filec option.
- Backgrounded screens and displays.
- Split screen editing.
I use it almost exclusively; when it's not available I usually use plain old ed(1) (my favorite ed is the one from plan9port, whose `,' does the right thing) or the already mentioned gritter vi. (Though I have also been dabbling with vile [ SlackBuild], which supports Unicode as well.)
PS: Regarding nvi: The only thing that's annoying is that when using `e' or `b' in command mode on a word with a unicode character (like the danish/norwegian Ø), it will treat the character as a word, so you have to press e or b more than once to get past `Søren', for example.
Last edited by lems; 08-08-2014 at 09:57 AM.
Reason: Added PS
|
|
|
08-08-2014, 09:57 AM
|
#70
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,151
Rep:
|
Quote:
Originally Posted by Soderlund
Some sources say that you can press Ctrl-Shift-U and enter a Unicode code point, but it doesn't work for me in the console or in X. I think it might be a GNOME or KDE thing.
|
It works including under Fluxbox, but it depends with which application. That works well in the Geany editor, and also in LQ's post editor in Firefox
Example:
U+00C6 LATIN CAPITAL LETTER AE:
Æ
Just press Ctrl-Shift-U, then enter 00C6 then press [Enter] or the spacebar here.
Last edited by Didier Spaier; 08-08-2014 at 10:31 AM.
|
|
3 members found this post helpful.
|
08-08-2014, 11:00 AM
|
#71
|
LQ Veteran
Registered: May 2008
Posts: 7,002
Original Poster
|
Quote:
Originally Posted by tronayne
Did you get the Unix toolchest ex? I've been using that, off and on, for some years in Slackware and it's worked well for me with the UTF-8 locale (right now it's off).
|
I built a ex-vi package from the sourceforge link that Soderlund provided above. uninstalled elvis, and installed the ex-vi executables directly to /usr/bin. I've been testing it as both a vi and ex (/usr/bin/vi -> /usr/bin/ex - replacing the /usr/bin/ex->/usr/bin/vim symlink that was there before). I've not played with 'Heirloom' or any other UNIX toolchest that may be out there.
It does seem a little odd that stock slackware has vi -> elvis, yet ex-> vim.
Quote:
Originally Posted by tronayne
Personally, I don't particularly like what vim does with all the eye candy -- I find it annoying with all the colors and other features (and don't want to fiddle with shutting them off). I like simple. Others like all that stuff, that's why we have a choice, eh?
|
Yes, I agree, vim is far too colourful with its default colourscheme. 'elvis' was much nicer and simpler in that respect, but if elvis doesn't work with UTF-8 and the vast majority of people are now running UTF-8 systems (which looks likely based on the results of the attached poll) then that's kind of deal-breaker.
On a system that's still using a single byte character set, I'd be inclined to stick with elvis, as it's a nice middle-ground between traditional vi and vim. I'm not questioning the value of including an elvis package in slackware, merely whether its sensible to continue to have it as the default 'vi' given its inability to deal with the character encoding that the majority now appear to be using.
|
|
|
08-08-2014, 11:11 AM
|
#72
|
LQ Veteran
Registered: May 2008
Posts: 7,002
Original Poster
|
Quote:
Originally Posted by Soderlund
Some sources say that you can press Ctrl-Shift-U and enter a Unicode code point, but it doesn't work for me in the console or in X. I think it might be a GNOME or KDE thing.
|
On the console you can enter the unicode code point by holding down the left alt key while typing the decimal value of the unicode character on the numpad.
i.e. for the euro symbol 0x20AC(decimal 8364): leftAlt-numpad8-numpad3-numbpad6-numpad4-release_leftAlt.
Its a bit of a pain though, and only works on the console, not in X.
|
|
1 members found this post helpful.
|
08-08-2014, 11:59 AM
|
#73
|
LQ Newbie
Registered: Feb 2013
Distribution: Fedora
Posts: 29
Rep:
|
Quote:
Originally Posted by Soderlund
There is one thing that I haven't figured out yet: Unicode compose. Some sources say that you can press Ctrl-Shift-U and enter a Unicode code point, but it doesn't work for me in the console or in X. I think it might be a GNOME or KDE thing.
|
From what I have read, Ctrl-Shift-U is a GTK thing and should work in any GTK app. I can get it to work just fine in the xfce-terminal but it will not work in konsole. The only thing I could ever find for KDE is setting the compose key in the keyboard advanced settings, but that just helps with key combinations, it doesn't allow you to enter a Unicode sequence.
|
|
1 members found this post helpful.
|
08-10-2014, 03:51 AM
|
#74
|
LQ Veteran
Registered: May 2008
Posts: 7,002
Original Poster
|
One annoying thing that I'd forgotten about traditional vi (which ex-vi also does), but neither elvis nor vim do, is to return to command mode when you move the cursor around when in input mode. This is going to take a bit of adjusting to.
... perhaps I'll just switch to emacs
|
|
|
08-10-2014, 05:14 AM
|
#75
|
Member
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 378
|
Quote:
Originally Posted by GazL
One annoying thing that I'd forgotten about traditional vi (which ex-vi also does), but neither elvis nor vim do, is to return to command mode when you move the cursor around when in input mode. This is going to take a bit of adjusting to.
... perhaps I'll just switch to emacs
|
If you feel the need to move while in insert mode, you're using vi inefficiently. The effective way to use it is to navigate in normal mode and type text in insert mode. This screencast demonstrates the benefits of using different modes for different tasks clearly. Answers to this Super User question also explain quite well why insert mode is best left for only inserting text.
|
|
|
All times are GMT -5. The time now is 03:13 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|