Re: Weird problem in xvile - I can't enter a '>' character
On Tue, Mar 12, 2024 at 06:10:33AM -0400, Thomas Dickey wrote: [a wonderful explanation of it all] > For amusement: > > https://invisible-island.net/xterm/modified-keys.html > :-) -- Chris Green
Re: Weird problem in xvile - I can't enter a '>' character
On Tue, Mar 12, 2024 at 02:25:59PM +1100, Brendan O'Dea wrote: > On Tue, 12 Mar 2024 at 02:28, Chris Green wrote: > > > > If I comment out the line:- > > > > keysym period = period rightcaret U25B6 NoSymbol > > > > then the > key works again in xvile. However I really don't see why > > the above line breaks xvile, no other programs (or none I can find > > anyway) are affected in the same way. The U25B6 character works in > > xvile as does 'period' (I'd really miss that one!). > > Maybe try : > > keysym period = period greater U25B6 NoSymbol > > On my machine, where I haven't remapped that key I get this: > > % xmodmap -pk | fgrep period > 600x002e (period) 0x003e (greater) 0x002e (period) 0x003e > (greater) > Yes, brilliant! Thank you. It now works. I don't know where I got rightcaret from. It's always the most difficult bit when playing with character mapping, finding the right names. -- Chris Green
Re: Weird problem in xvile - I can't enter a '>' character
On Mon, Mar 11, 2024 at 02:37:56PM +, Chris Green wrote: > On Mon, Mar 11, 2024 at 10:26:07AM -0400, Thomas Dickey wrote: > > On Mon, Mar 11, 2024 at 10:16:08AM -0400, Paul Fox wrote: > > > chris wrote: > > > > I don't use xvile all that much, I use vile in a terminal window most > > > > of the time, however I do sometimes find I need to use xvile. > > > > > > > > I've just found that the > character doesn't work in xvile. This > > > > seems to be the same on both version 9.8v and 9.8y running on two > > > > different xubuntu systems. > > > > > > > > The > character works fine everwhere else, in vile, in the terminal > > > > window, in browser windows, etc. > > > > > > > > I've tried changing font selection but that didn't help. > > > > > > > > I *can* enter a > by typing x3e. > > > > > > > > Any ideas how to diagnose this? > > > > > > Perhaps not much help, but: works for me, 9.8v on Ubuntu. > > > > same here. > > > > I'd suspect locale-related problems (e.g., the keyboard configuration). > > Some environments tend to switch my keyboard settings to UK - perhaps > > you have the complementary problem of switching to US? > > Yes, it really has to be something in my environment as otherwise I'm > sure other people would be reporting the same problem. I've tried > changing user and that hasn't helped though. > Well I have found what causes the problem but I don't understand why or how to fix it. I have a .Xmodmap file as follows:- ! pointer = 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 ! ! ! Set 'Windows' key to Multi_key, for accented characters etc. ! keycode 133 = Multi_key ! ! ! Set AltGr to be Mode_switch key ! keycode 108 = Mode_switch Mode_switch ! ! ! Add a few special characters using the Mode_switch key (which is 'Alt Gr') ! keysym period = period rightcaret U25B6 NoSymbol keysym slash = slash question U2714 U2714 keysym 3 = 3 U00A3 U20AC U20AC ! ! ! Prevent shifted space from giving nobreakspace, but leave with Mode_switch key ! keycode 65 = space space nobreakspace nobreakspace ! ! ! Stop CapsLock from doing CapsLock (xbindkeys makes it paste) ! clear lock keycode 66 = NoSymbol NoSymbol NoSymbol NoSymbol If I comment out the line:- keysym period = period rightcaret U25B6 NoSymbol then the > key works again in xvile. However I really don't see why the above line breaks xvile, no other programs (or none I can find anyway) are affected in the same way. The U25B6 character works in xvile as does 'period' (I'd really miss that one!). The 'keysym slash = slash question U2714 U2714' works as expected in xvile so it's not a general problem with using keysym. I don't actually use the added ▶ character much so I won't really miss that line all that much. It's still rather puzzling though! -- Chris Green
Re: Weird problem in xvile - I can't enter a '>' character
On Mon, Mar 11, 2024 at 10:26:07AM -0400, Thomas Dickey wrote: > On Mon, Mar 11, 2024 at 10:16:08AM -0400, Paul Fox wrote: > > chris wrote: > > > I don't use xvile all that much, I use vile in a terminal window most > > > of the time, however I do sometimes find I need to use xvile. > > > > > > I've just found that the > character doesn't work in xvile. This > > > seems to be the same on both version 9.8v and 9.8y running on two > > > different xubuntu systems. > > > > > > The > character works fine everwhere else, in vile, in the terminal > > > window, in browser windows, etc. > > > > > > I've tried changing font selection but that didn't help. > > > > > > I *can* enter a > by typing x3e. > > > > > > Any ideas how to diagnose this? > > > > Perhaps not much help, but: works for me, 9.8v on Ubuntu. > > same here. > > I'd suspect locale-related problems (e.g., the keyboard configuration). > Some environments tend to switch my keyboard settings to UK - perhaps > you have the complementary problem of switching to US? Yes, it really has to be something in my environment as otherwise I'm sure other people would be reporting the same problem. I've tried changing user and that hasn't helped though. -- Chris Green
Weird problem in xvile - I can't enter a '>' character
I don't use xvile all that much, I use vile in a terminal window most of the time, however I do sometimes find I need to use xvile. I've just found that the > character doesn't work in xvile. This seems to be the same on both version 9.8v and 9.8y running on two different xubuntu systems. The > character works fine everwhere else, in vile, in the terminal window, in browser windows, etc. I've tried changing font selection but that didn't help. I *can* enter a > by typing x3e. Any ideas how to diagnose this? -- Chris Green
Re: How to access vile variables in : command?
On Wed, Nov 08, 2023 at 06:30:21PM -0500, Thomas Dickey wrote: > On Wed, Nov 08, 2023 at 03:51:37PM +0000, Chris Green wrote: > > I'm sure this should be obvious but at the moment it's not obvious to > > me! :-) > > > > I want to do something like the following:- > > > > map #9 :e `pdf $cfilname`^M > > > > However the above doesn't work, $cfilname is null in the above > > context. How can I get the current file's name in this sort of place? > > rather than map, doing a bind (to a stored macro) would work. > > #9 is treated as function-key 9, and by default is bound to the name > execute-macro-9 (seen using describe-key): > > "execute-macro-9" #-9 > > untested (does pdf echo the name of the file? - I checked with just "echo"), > but to give some idea how to organize it: > > 9 store-macro > " make a buffer to get the output of pdf > kill-buffer pdf-output > edit-file "!pdf " $pathname > rename-buffer pdf-output > " cursor is at the beginning of the line; open that file > find-file $pathname > " dispose of the temporary buffer > kill-buffer pdf-output > ~endm > Thank you, I suspected there might be some way like this but just couldn't see it. That gives me lots of handles for getting what I want. -- Chris Green
Re: How to access vile variables in : command?
On Thu, Nov 09, 2023 at 09:53:27AM +1100, Brendan O'Dea wrote: > On Thu, 9 Nov 2023 at 02:52, Chris Green wrote: > > > > I'm sure this should be obvious but at the moment it's not obvious to > > me! :-) > > > > I want to do something like the following:- > > > > map #9 :e `pdf $cfilname`^M > > > > However the above doesn't work, $cfilname is null in the above > > context. How can I get the current file's name in this sort of place? > > > Not sure about variables in general, but you should be able to use % > for the current filename here (and # for the alternate filename). > Of course, lateral thinking required, works a treat, thank you! -- Chris Green
How to access vile variables in : command?
I'm sure this should be obvious but at the moment it's not obvious to me! :-) I want to do something like the following:- map #9 :e `pdf $cfilname`^M However the above doesn't work, $cfilname is null in the above context. How can I get the current file's name in this sort of place? -- Chris Green
Can one build a static vile easily?
Is there any way to build a 'static' version of vile fairly easily? ... or a way to create something like an appimage? -- Chris Green
Re: What actually are hypertext commands in vile?
On Sat, May 13, 2023 at 01:24:39PM -0400, Paul Fox wrote: > chris wrote: > > On Sat, May 13, 2023 at 10:20:14AM -0400, Thomas Dickey wrote: > > > On Sat, May 13, 2023 at 02:01:41PM +0100, Chris Green wrote: > > > > While, just now, mucking about in my .vilerc I saw the hypertext macro > > > > that has been there for ages (copied from help):- > > > > > > > > 22 store-macro > > > > ~force execute-hypertext-command > > > > ~if $status > > > > ~force forward-character-to-eol > > > > ~endif > > > > ~endm > > > > bind-key execute-macro-22 ' ' > > > > > > > > So what does vile understand/see as a hypertext link? I tried a few > > > > possibles (http://, file://) but nothing actually appeared to do > > > > anything. Only file:// would seem to make any sense as a file to go > > > > to and edit. Maybe I'm misunderstanding what it's supposed to do > > > > (very likely!). > > > > > > It's only used for vile's commands (no web browser). > > > > > > "execute-hypertext-command" ^X-z > > > ( run the hypertext command attached to the region under the cursor ) > > > > > As in execute a command like 'edit-file' that's in the text of a file? > > Yes, but I think there's one more level of indirection. The text in > the file would say "foo", and the action would be "edit-file bar". Or > something like that. If you have (or can find) archives of this list, > search for "hgrep", which is a recursive file grepper written in perl. > (I've never used it.) > Yes, I found a reference to hgrep when I did a web search just now. Maybe I'll look a bit harder, it's only curiosity though. -- Chris Green
Re: What actually are hypertext commands in vile?
On Sat, May 13, 2023 at 10:20:14AM -0400, Thomas Dickey wrote: > On Sat, May 13, 2023 at 02:01:41PM +0100, Chris Green wrote: > > While, just now, mucking about in my .vilerc I saw the hypertext macro > > that has been there for ages (copied from help):- > > > > 22 store-macro > > ~force execute-hypertext-command > > ~if $status > > ~force forward-character-to-eol > > ~endif > > ~endm > > bind-key execute-macro-22 ' ' > > > > So what does vile understand/see as a hypertext link? I tried a few > > possibles (http://, file://) but nothing actually appeared to do > > anything. Only file:// would seem to make any sense as a file to go > > to and edit. Maybe I'm misunderstanding what it's supposed to do > > (very likely!). > > It's only used for vile's commands (no web browser). > > "execute-hypertext-command" ^X-z > ( run the hypertext command attached to the region under the cursor ) > As in execute a command like 'edit-file' that's in the text of a file? -- Chris Green
What actually are hypertext commands in vile?
While, just now, mucking about in my .vilerc I saw the hypertext macro that has been there for ages (copied from help):- 22 store-macro ~force execute-hypertext-command ~if $status ~force forward-character-to-eol ~endif ~endm bind-key execute-macro-22 ' ' So what does vile understand/see as a hypertext link? I tried a few possibles (http://, file://) but nothing actually appeared to do anything. Only file:// would seem to make any sense as a file to go to and edit. Maybe I'm misunderstanding what it's supposed to do (very likely!). Just curious really, I can't think of an application for me at the moment. -- Chris Green
Re: How to map the # key to a command?
On Sat, May 13, 2023 at 07:48:25AM -0400, Paul Fox wrote: > chris wrote: > > On Sat, May 13, 2023 at 11:09:59AM +0100, Chris Green wrote: > > > On Sat, May 13, 2023 at 11:04:26AM +0100, Chris Green wrote: > > > > I can map the # key to do ^Xe 'manually' when running vile simply by > > > > going to the colon prompt and entering 'map ', then entering # in > > > > response to 'change this string' and, finally ^Xe in response to 'to > > > > this new string'. The # key then opens the file under the cursor for > > > > editing. > > > > > > > > However I can't seem to get the same result by entering the map > > > > command in my .vilerc file. > > > > > > > > What do I need in .vilerc to get # to 'edit file under cursor'? > > > > > > > It's OK, I think I've worked it out, I need to use bind-cmdmode-key to > > > do it. > > > > > But of course rebinding the # key has lots of repercussions! :-) I > > need to go and rethink what I'm doing! > > :-) > > I do use map for some things, but sometimes I find it easier > to use load-register. If I happen to use the register for a yank > while editing (unlikely for the later members of the alphabet), I > lose that macro, but it's not a big deal. (I've converted the literal > ^M characters to two ascii characters for this message, but they need > to be literal in .vilerc) > > ; @h --turn off syntax highlighting > use-register h load-register ":set nohighlight^M" > ; @w -- make current buffer's file writeable, and write it > use-register w load-register ":!chmod +w %^M:w^M" > ; @s -- suck in my .signature > use-register s load-register "G:r ~/.signature^M" > > I guess it doesn't really help if you're trying to find a shortcut for > a two character command (^Xe --> #), But unlike ^X, '@' doesn't need a > modifier. > In the end I have used E as I never use[d] the default binding for that. So:- bind-key edit-file E Does just what I want, gives me a single key way to edit files loaded as a result of 'vi ' which I have just created a need for. I might even use lower case e (even simpler, no need to shift)) because I don't think I have ever used the default e either. -- Chris Green
Re: How to map the # key to a command?
On Sat, May 13, 2023 at 11:09:59AM +0100, Chris Green wrote: > On Sat, May 13, 2023 at 11:04:26AM +0100, Chris Green wrote: > > I can map the # key to do ^Xe 'manually' when running vile simply by > > going to the colon prompt and entering 'map ', then entering # in > > response to 'change this string' and, finally ^Xe in response to 'to > > this new string'. The # key then opens the file under the cursor for > > editing. > > > > However I can't seem to get the same result by entering the map > > command in my .vilerc file. > > > > What do I need in .vilerc to get # to 'edit file under cursor'? > > > It's OK, I think I've worked it out, I need to use bind-cmdmode-key to > do it. > But of course rebinding the # key has lots of repercussions! :-) I need to go and rethink what I'm doing! -- Chris Green
Re: How to map the # key to a command?
On Sat, May 13, 2023 at 11:04:26AM +0100, Chris Green wrote: > I can map the # key to do ^Xe 'manually' when running vile simply by > going to the colon prompt and entering 'map ', then entering # in > response to 'change this string' and, finally ^Xe in response to 'to > this new string'. The # key then opens the file under the cursor for > editing. > > However I can't seem to get the same result by entering the map > command in my .vilerc file. > > What do I need in .vilerc to get # to 'edit file under cursor'? > It's OK, I think I've worked it out, I need to use bind-cmdmode-key to do it. -- Chris Green
How to map the # key to a command?
I can map the # key to do ^Xe 'manually' when running vile simply by going to the colon prompt and entering 'map ', then entering # in response to 'change this string' and, finally ^Xe in response to 'to this new string'. The # key then opens the file under the cursor for editing. However I can't seem to get the same result by entering the map command in my .vilerc file. What do I need in .vilerc to get # to 'edit file under cursor'? -- Chris Green
What do these entries in 'show-commands' mean?
In the 'show-commands' output there are entries like the following:- "edit-file" ^X-e or"E" or"e" or"find-file" ( bring given (or under-cursor) file or existing buffer into window ) I know that CTRL-X plus e opens the file under the cursor for editing, but what do the other entries mean? Ah, I think I understand, "edit-file", "E", "e" and "find-file" are effectively 'synonymns' for the same action (they can be entered at the : prompt). ^X-e invokes that command from command mode. Is there an easy way to list all the single character command-mode keys? -- Chris Green
Re: compile of 9.8 failed
On Wed, Jan 04, 2023 at 03:16:44PM +0100, joerg van den hoff wrote: > > > If you don't have a [f]lex that vile likes you won't be able to build > > built-in syntax filters. > > understood. that one I had fixed by installing flex individually. > > > > again, thanks a lot for your help! I can now active `alias vi=vile' and > EDITOR=vile in my .kshrc and > be happy again. > Excellent, I'm glad it all worked out. If you investigate 'alternatives' (man update-alternatives) you can make vile your vi for everyone and everything, including root. It's handy for root at least so that you get vile when editing config files and such in /etc. -- Chris Green
Re: compile of 9.8 failed
On Wed, Jan 04, 2023 at 02:15:54PM +0100, joerg van den hoff wrote: > > > On 04.01.23 12:22, Chris Green wrote: > > On Wed, Jan 04, 2023 at 11:15:24AM +0100, joerg van den hoff wrote: > >> happy long time vile user here: I have used vile for a long time under > >> OSX and compiles always "just > >> worked". > >> > >> now, I have tried to compile it under OpenSuse linux on an old laptop I > >> have started playing around > >> with, but no luck. I get lot's of > >> > >> undefined reference to `tputs' > >> > >> and similar errors (referring to `tgoto', `tgetent', `tgetflag', `tgenum' > >> etc.) and compile fails. > >> the executed `./configure' run did not show any obvious problems. > >> > >> since I am a) totally new to OpenSuse and b) not into C programming I am > >> at a loss where to look to > >> find out which library or header file is missing (which I guess is the > issue here?). I guessed at > >> "termcap" and installed that package but that didn't help. > >> > >> any advice would be appreciated :). > >> > > The way I do it on Linux is to install the libncurses-dev package and > > then './configure --with-ncurses'. > > thank you, but no luck: > > * no "-dev" package on opensuse > > * but there _is_ a /lib64/libncurses.so.6 already installed > > * ./configure --with-ncurses errors out with: > Yes, that's as expected, you need whatever opensuse calls the -dev package as that has the header files etc. that are bing looked for. I did a quick search and it would appear that opensuse uses a different way to handle installing development resources, see:- https://www.osradar.com/install-development-build-tools-opensuse/ You could alternatively build ncurses yourself (see below) > . > . > . > checking for screen type... termcap > checking if you want to use ncurses... yes > Looking for ncurses-config > checking for ncurses6-config... no > checking for ncurses5-config... no > checking for ncurses header in include-path... no > checking for ncurses include-path... configure: error: not found > > > same happens if `--with-curses-dir=/lib64' is specified. > > as said, bare-bones ./configure runs to completion but then the make fails > with the stated > 'undefined reference' errors. I now have filtered out all `configure' > messages > appearing on stderr: > > configure: WARNING: Your lex program does not support POSIX %pointer. Get > flex. > configure: WARNING: Your lex program does not support POSIX character > classes. Get flex. > configure: WARNING: Your lex program does not support POSIX options. Get > flex. > configure: WARNING: disabling build for lex-filters > configure: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap > > apart from the flex issue (went indeed away after installing it ;)): I > don't understand why none of > those 3 libs is found: > > * termlib indeed seems not available as an opensuse package > > * but I do have /lib64/libncurses.so.6 and even setting LDLFAGS=-L/lib64 did > not change anything > > * I also do have /usr/lib64/libtermcap.so.2 (which I manually installed > You can download .tgz files for reflex and ncurses from the vile web site at invisible island. I've done this on a couple of systems where I don't have root access and have build them with '--prefix=$HOME', then tell vile's ./comfigure where to find them and you're done. If you don't have a [f]lex that vile likes you won't be able to build built-in syntax filters. -- Chris Green
Re: compile of 9.8 failed
On Wed, Jan 04, 2023 at 11:15:24AM +0100, joerg van den hoff wrote: > happy long time vile user here: I have used vile for a long time under > OSX and compiles always "just > worked". > > now, I have tried to compile it under OpenSuse linux on an old laptop I > have started playing around > with, but no luck. I get lot's of > > undefined reference to `tputs' > > and similar errors (referring to `tgoto', `tgetent', `tgetflag', `tgenum' > etc.) and compile fails. > the executed `./configure' run did not show any obvious problems. > > since I am a) totally new to OpenSuse and b) not into C programming I am > at a loss where to look to > find out which library or header file is missing (which I guess is the issue > here?). I guessed at > "termcap" and installed that package but that didn't help. > > any advice would be appreciated :). > The way I do it on Linux is to install the libncurses-dev package and then './configure --with-ncurses'. -- Chris Green
However accented characters are still rather broken
So, after partially understanding the syntax highlighting issue I now see that entering accented characters is still broken. As reported a while ago vile 9.8v gets confused when you try to enter accented characters (I use a Multi_key, so to enter, for example an e with an acute accent I hit Multi_key, e, '). On vile 9.8u (and earlier, I've checked 9.8t too) entering accented characters with the Multi_key works perfectly. On 9.8v (as reported) on entering an accented character an odd backslash sequence is echoed and it's not the character entered. On vile 9.8w (from the Ubuntu repository) entering an accented character does nothing if you enter just one accented character but if you enter a second accented character that *does* get added. This continues, entering a series of accented characters every other one actually gets inserted. -- Chris Green
Start again with syntax highlighting problem
OK, restart, I think I now see a pattern in this. I completely removed and re-installed vile from the Ubuntu repositories on esprimo and it is now working correctly there. I had modified it there because of the issue a while ago with UTF8 characters. So the table is now as follows:- backup xubuntu 22.10 vile 9.8w colour OK, but not right bison Android 11 vile 9.8w colour OK, but not right caracal Debian 10 vile 9.8no colour syntax cheddar Debian 10 vile 9.8t colour OK esprimo xubuntu 22.04 vile 9.8v colour OK isbdUbuntu 20.04vile 9.8t colour OK odinDebian 9vile 9.8s colour OK pimedia Debian 11 vile 9.8u colour OK t470xubuntu 22.10 vile 9.8w colour OK, but not right tsohost very oldvile 9.8no colour syntax This makes *much* more sense! :-) The systems with versions older than vile9.8w do syntax highlighting OK. The two systems where I built vile myself and installed as a user (no root access) don't do syntax highlighting but thati's almost certainly something I have missed out in the build and it's not so important there anyway. So, the question is why the syntax highlighting of vilemode for version 9.8w is messed up. It's not badly wrong, it gets the colour of comments right throughout but gets confused about keyword colours and within some 'map' settings. As far as I can see on other file types (shell scripts, python, C) version 9.8w gets the highlighting correct so it does look like just an error in the vilemode highlighting. Has the vile-filt-filt file changed between 9.8v and 9.8w? -- Chris Green
Re: Syntax colour highlighting problem - not working on some of my systems
On Sun, Jan 01, 2023 at 05:53:22PM -0500, Thomas Dickey wrote: > On Sun, Jan 01, 2023 at 08:02:31PM +0000, Chris Green wrote: > > On Sun, Jan 01, 2023 at 06:13:07PM +0000, Chris Green wrote: > > > The eternal problem > > > > > > On just *some* of my several Linux systems colour syntax higlighting > > > isn't working. It always used to work but I really can't see what I > > > might have changed on *some* systems to break it. > > > > > > The systems and versions and 'working or not' are:- > > > > > > backup xubuntu 22.10 vile 9.8w colour OK > > > bison Android 11 vile 9.8w colour OK > > > caracal Debian 10 vile 9.8no colour syntax > > > cheddar Debian 10 vile 9.8t colour OK > > > esprimo xubuntu 22.04 vile 9.8u no colour syntax > > > isbdUbuntu 20.04vile 9.8t colour OK > > > odinDebian 9vile 9.8s colour OK > > > pimedia Debian 11 vile 9.8u colour OK > > > t470xubuntu 22.10 vile 9.8w colour OK > > > tsohost very oldvile 9.8no colour syntax > > > > > > Since esprimo is my main desktop system it's a bit annoying that > > > syntax colouring isn't working there. > > > > > > On all systems 'show-colors' in vile works fine, so they're all > > > *capable* of colour. The two systems showing just vile 9.8 are ones > > > where I have built vile myself, so they have pretty recent code. > > > > > > All systems have the same .vilerc and it runs with no errors. So they > > > all execute:- > > > > > > source filters.rc > > > setv $autocolor-hook HighlightFilter > > > setv $read-hook HighlightFilter > > > set autocolor=500 > > > set bcolor=default > > > > > > I'm stumped! Can anyone point me at some way to diagnose what's > > > wrong? Could it (possibly) be something to do with built-in or > > > external filters? If so, how do I tell whether vile was built with > > > 'built-in' or not? > > > > > Just to add to the fun if I run xvile remotely across an 'ssh -Y' > > connection to esprimo the syntax highlighting works OK. (that's > > running xvile on esprimo from t470) > > > > This suggests to me that it's something to do with how vile was built > > (it's the version from the repositories). > > vile's running in a terminal. I'd check if the terminal is configured for > color: disregarding hard-coded stuff, the value of $TERM is used to select > a terminal description. If it's "vt100" on some machines, that would explain. > > Running this from the command-line will show colors only if the terminal is > configured: > > #!/bin/sh > tput blink > tput bold > tput setab 1 > tput setaf 4 > printf "Hello-" > tput setaf 1 > tput setab 4 > echo "world" > tput sgr0 > read aa > Above script outputs blinking text on coloured background so I think my terminal setting is OK. I'm beginning to suspect that it's how vile is built that's affecting my syntax highlighting. I'm not only seeing no syntax highlighting on some systems but I'm also seeing two different versions of syntax highlighting in vilemode. In fact vilemode seems to confuse the syntax highlighting somewhat, shmode and and pymode seem to be fine in all cases (when syntax highlighting is working that is). -- Chris Green
Re: Syntax colour highlighting problem - not working on some of my systems
On Sun, Jan 01, 2023 at 06:13:07PM +, Chris Green wrote: > The eternal problem > > On just *some* of my several Linux systems colour syntax higlighting > isn't working. It always used to work but I really can't see what I > might have changed on *some* systems to break it. > > The systems and versions and 'working or not' are:- > > backup xubuntu 22.10 vile 9.8w colour OK > bison Android 11 vile 9.8w colour OK > caracal Debian 10 vile 9.8no colour syntax > cheddar Debian 10 vile 9.8t colour OK > esprimo xubuntu 22.04 vile 9.8u no colour syntax > isbdUbuntu 20.04vile 9.8t colour OK > odinDebian 9vile 9.8s colour OK > pimedia Debian 11 vile 9.8u colour OK > t470xubuntu 22.10 vile 9.8w colour OK > tsohost very oldvile 9.8no colour syntax > > Since esprimo is my main desktop system it's a bit annoying that > syntax colouring isn't working there. > > On all systems 'show-colors' in vile works fine, so they're all > *capable* of colour. The two systems showing just vile 9.8 are ones > where I have built vile myself, so they have pretty recent code. > > All systems have the same .vilerc and it runs with no errors. So they > all execute:- > > source filters.rc > setv $autocolor-hook HighlightFilter > setv $read-hook HighlightFilter > set autocolor=500 > set bcolor=default > > I'm stumped! Can anyone point me at some way to diagnose what's > wrong? Could it (possibly) be something to do with built-in or > external filters? If so, how do I tell whether vile was built with > 'built-in' or not? > Just to add to the fun if I run xvile remotely across an 'ssh -Y' connection to esprimo the syntax highlighting works OK. (that's running xvile on esprimo from t470) This suggests to me that it's something to do with how vile was built (it's the version from the repositories). -- Chris Green
Syntax colour highlighting problem - not working on some of my systems
The eternal problem On just *some* of my several Linux systems colour syntax higlighting isn't working. It always used to work but I really can't see what I might have changed on *some* systems to break it. The systems and versions and 'working or not' are:- backup xubuntu 22.10 vile 9.8w colour OK bison Android 11 vile 9.8w colour OK caracal Debian 10 vile 9.8no colour syntax cheddar Debian 10 vile 9.8t colour OK esprimo xubuntu 22.04 vile 9.8u no colour syntax isbdUbuntu 20.04vile 9.8t colour OK odinDebian 9vile 9.8s colour OK pimedia Debian 11 vile 9.8u colour OK t470xubuntu 22.10 vile 9.8w colour OK tsohost very oldvile 9.8no colour syntax Since esprimo is my main desktop system it's a bit annoying that syntax colouring isn't working there. On all systems 'show-colors' in vile works fine, so they're all *capable* of colour. The two systems showing just vile 9.8 are ones where I have built vile myself, so they have pretty recent code. All systems have the same .vilerc and it runs with no errors. So they all execute:- source filters.rc setv $autocolor-hook HighlightFilter setv $read-hook HighlightFilter set autocolor=500 set bcolor=default I'm stumped! Can anyone point me at some way to diagnose what's wrong? Could it (possibly) be something to do with built-in or external filters? If so, how do I tell whether vile was built with 'built-in' or not? -- Chris Green
Re: Build errors at link time - what am I missing?
On Thu, Dec 01, 2022 at 10:29:57AM +1100, Brendan O'Dea wrote: > On Thu, 1 Dec 2022 at 07:26, Chris Green wrote: > > > However, later on in configure I get:- > > > configure: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap > > > and then at link time there are loads of undefined references to > > > tputs, tgoto, and a lot of other tx symbols. > > > > > > So presumably I need to build one of those libraries, or is there > > > something simpler I can do? > > If you don't have permission to install packages, then you will need > to build some of the dependencies in your home directory. > > > The system does have libncurses, it's in /usr/lib/x86_64-linux-gnu. Is > > it possible that directory isn't on the cc/linker search path? How do > > I add it? > > Debian splits libraries into runtime and development components: the > runtime package contains just the versioned shared library such as > libncurses.so.6, and the development package contains the symlink to > the appropriate version of the shared library (e.g. libncurses.so -> > libncurses.so.6), and the header files. > > So even if libncurses.so.6 is installed, that is not enough to build > with. If you're building in your home directory, you can probably > just get: > > https://invisible-island.net/ncurses/ncurses.html > > and build that with --prefix=$HOME. It needs --with-ncurses as well of course (well it did for me anyway). All built OK though and now I have a working vile. >I think that this will provide an > appropriate flex: > > https://invisible-island.net/reflex/reflex.html > This didn't work for me because there isn't a yacc available, I'm not going to bother as (as I said) I don't think I need the lex filters. > The only other things that I build the Debian package with are Perl > and Xaw, which you can skip if you don't fancy building Perl, and > don't care about X. > Correct, it's just a command line so no use for X and I don't need the perl extras. Thanks all. -- Chris Green
Re: Build errors at link time - what am I missing?
On Wed, Nov 30, 2022 at 06:32:59PM -0500, Thomas Dickey wrote: > On Wed, Nov 30, 2022 at 08:26:07PM +0000, Chris Green wrote: > > On Wed, Nov 30, 2022 at 08:20:53PM +0000, Chris Green wrote: > > > I'm trying to build vile-9.8 on a Debian system where I have a shared > > > hosting account with ssh access. > > > > > > I'm doing "./configure --prefix=$HOME" and it runs OK but there are > > > couple of warnings. > > > > > > Firstly it can't find a good lex so it says:- > > > configure: WARNING: disabling build for lex-filters > > > I don't think this is going to be an issue. > > > > > > However, later on in configure I get:- > > > configure: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap > > > and then at link time there are loads of undefined references to > > > tputs, tgoto, and a lot of other tx symbols. > > > > > > So presumably I need to build one of those libraries, or is there > > > something simpler I can do? > > > > > The system does have libncurses, it's in /usr/lib/x86_64-linux-gnu. Is > > it possible that directory isn't on the cc/linker search path? How do > > I add it? > > You need the development package. The runtime package has a similarly named > library file. > > For example (Debian/oldstable) > > libtinfo6 has > /usr/lib/x86_64-linux-gnu/libtic.so.6 > > libncurses-dev hs > /usr/lib/x86_64-linux-gnu/libtinfo.so > > The plain ".so" is what development packages link with, e.g., -ltinfo > There's some .so files buried deep down:- chrisisbd@caracal:/usr/lib/x86_64-linux-gnu/zsh/5.7.1$ cd zsh chrisisbd@caracal:/usr/lib/x86_64-linux-gnu/zsh/5.7.1/zsh$ ls attr.so complist.so example.so nearcolor.so pcre.so system.so zleparameter.so cap.so computil.so files.so net regex.so termcap.so zprof.so clone.so curses.so langinfo.so newuser.sorlimits.so terminfo.so zpty.so compctl.so datetime.so mapfile.so param sched.sozftp.so zselect.so complete.so deltochar.so mathfunc.so parameter.so stat.so zle.so zutil.so Will these allow me to build if I include that directory in the ld search path? If so, how do I include that directory? If not then I guess I'll have to build ncurses as desribed in the E-Mail before. Thanks both. -- Chris Green
Re: Build errors at link time - what am I missing?
On Wed, Nov 30, 2022 at 08:20:53PM +, Chris Green wrote: > I'm trying to build vile-9.8 on a Debian system where I have a shared > hosting account with ssh access. > > I'm doing "./configure --prefix=$HOME" and it runs OK but there are > couple of warnings. > > Firstly it can't find a good lex so it says:- > configure: WARNING: disabling build for lex-filters > I don't think this is going to be an issue. > > However, later on in configure I get:- > configure: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap > and then at link time there are loads of undefined references to > tputs, tgoto, and a lot of other tx symbols. > > So presumably I need to build one of those libraries, or is there > something simpler I can do? > The system does have libncurses, it's in /usr/lib/x86_64-linux-gnu. Is it possible that directory isn't on the cc/linker search path? How do I add it? -- Chris Green
Build errors at link time - what am I missing?
I'm trying to build vile-9.8 on a Debian system where I have a shared hosting account with ssh access. I'm doing "./configure --prefix=$HOME" and it runs OK but there are couple of warnings. Firstly it can't find a good lex so it says:- configure: WARNING: disabling build for lex-filters I don't think this is going to be an issue. However, later on in configure I get:- configure: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap and then at link time there are loads of undefined references to tputs, tgoto, and a lot of other tx symbols. So presumably I need to build one of those libraries, or is there something simpler I can do? -- Chris Green
Re: Always get two windows when using -c
On Sun, Nov 13, 2022 at 07:16:43PM -0500, Thomas Dickey wrote: > On Sun, Nov 13, 2022 at 09:55:18PM +0000, Chris Green wrote: > > On Sun, Nov 13, 2022 at 03:40:43PM -0500, Thomas Dickey wrote: > > > On Sun, Nov 13, 2022 at 08:11:17PM +, Chris Green wrote: > > > > On Sun, Nov 13, 2022 at 10:55:07AM -0500, Thomas Dickey wrote: > > > > > On Sun, Nov 13, 2022 at 01:57:30PM +, Chris Green wrote: > > > > > > This relates to my recent posting about trying to use the '-c' > > > > > > command > > > > > > line option. However it's now a more general problem/question. > > > > > > > > > > > > Whenever I add a '-c command' (or a '+ command', or a '-g NNN') to > > > > > > the > > > > > > command line vile opens two windows, the file I want is in the first > > > > > > window and the following is in the second (lower) window:- > > > > > > > > > > > > [Reading /home/chris/.vilerc] > > > > > > > > > > perhaps your .vilerc doesn't set nopopup-msgs (or sets popup-msgs) > > > > > > > > > My .vilerc is:- > > > > > > > > > > > ... > > > > source digraphs.rc > > > > > > > > But it's happenning before reading .vilerc isn't it? > > > > > > no - it's happening because of the warning message: > > > > > > * If no warning messages were encountered during startup, and the > > > popup-msgs > > > * mode wasn't enabled, discard the informational messages that are there > > > * already. > > > > > > you could do this > > > > > > vile -c goto-end-of-file > > > > > Ah! Thank you, that does what I need. > > > > However I'm still a little confused, when you say "it's happening > > because of the warning message", am I getting a warning message? If > > so, what is it? ... and can I stop it? > > The error message was this - > > "/home/chris/wiki/data/pages/boating/diary/2011/05/20.txt"] > > [Not that many lines in buffer: 20] Oh, I see. I don't think the error was causing the second window to open though. I think my problem was confusion (mine) about what commands one can put after the '-c'. The commands have to be ones that work at the : prompt and I wasn't realising that. What I was doing was entering single letter commands which, if entered at the : simply wait for more input. Thanks for your help. -- Chris Green
Re: Always get two windows when using -c
On Sun, Nov 13, 2022 at 03:40:43PM -0500, Thomas Dickey wrote: > On Sun, Nov 13, 2022 at 08:11:17PM +0000, Chris Green wrote: > > On Sun, Nov 13, 2022 at 10:55:07AM -0500, Thomas Dickey wrote: > > > On Sun, Nov 13, 2022 at 01:57:30PM +, Chris Green wrote: > > > > This relates to my recent posting about trying to use the '-c' command > > > > line option. However it's now a more general problem/question. > > > > > > > > Whenever I add a '-c command' (or a '+ command', or a '-g NNN') to the > > > > command line vile opens two windows, the file I want is in the first > > > > window and the following is in the second (lower) window:- > > > > > > > > [Reading /home/chris/.vilerc] > > > > > > perhaps your .vilerc doesn't set nopopup-msgs (or sets popup-msgs) > > > > > My .vilerc is:- > > > > > ... > > source digraphs.rc > > > > But it's happenning before reading .vilerc isn't it? > > no - it's happening because of the warning message: > > * If no warning messages were encountered during startup, and the popup-msgs > * mode wasn't enabled, discard the informational messages that are there > * already. > > you could do this > > vile -c goto-end-of-file > Ah! Thank you, that does what I need. However I'm still a little confused, when you say "it's happening because of the warning message", am I getting a warning message? If so, what is it? ... and can I stop it? Are you saying that "source digraphs.rc" is causing it? ... I've had a boozy supper just now on my birthday today so apologies for confused/confusing replies. :-) -- Chris Green
Re: Always get two windows when using -c
On Sun, Nov 13, 2022 at 10:55:07AM -0500, Thomas Dickey wrote: > On Sun, Nov 13, 2022 at 01:57:30PM +0000, Chris Green wrote: > > This relates to my recent posting about trying to use the '-c' command > > line option. However it's now a more general problem/question. > > > > Whenever I add a '-c command' (or a '+ command', or a '-g NNN') to the > > command line vile opens two windows, the file I want is in the first > > window and the following is in the second (lower) window:- > > > > [Reading /home/chris/.vilerc] > > perhaps your .vilerc doesn't set nopopup-msgs (or sets popup-msgs) > My .vilerc is:- ; ; ; Basic configuration ; set autoindent shiftwidth=4 nowrapscan flash notabinsert modeline set c-shiftwidth=4 smoothscroll timeoutlen=100 undolimit=100 noerrorbells set tabstop=8 c-tabstop=8 set file-encoding=utf-8 set fcolor=black set noautobuffer ; ; ; map commands, work in command mode ; ; F4 - set tabstops to 4 (for code which was built that way, not mine) ; F5 - change /* ... */ comments to // comments ; F6 - turn off autoindent and line wrap, i.e. text 'as is' ; F7 - remove spaces after ( and before ) ; F8 - set tabstops to 8 (my default) ; map #4 :set tabstop=4 c-tabstop=4 map #5 :1,$s/[ ]*;[]*$/;/ map #6 :set noautoindent wrapmargin=0 linewrap map #7 :1,$s/( /(/g :1,$s/ )/)/g map #8 :set tabstop=8 c-tabstop=8 ; ; ; map commands for special characters, work in insert mode ; ; ; F4 - ✔ tick ; map! #4 u2714 22 store-macro ~force execute-hypertext-command ~if $status ~force forward-character-to-eol ~endif ~endm bind-key execute-macro-22 ^M ; ; ; set up syntax highlighting ; source filters.rc setv $autocolor-hook HighlightFilter setv $read-hook HighlightFilter set autocolor=500 set bcolor=default ; ; ; a .ini file isn't a DOS file in my world ; remove-submode ini dos ; ; ; a file with no suffix is a text file ; define-submode txt suffixes '' ; ; ; Set up ^K as 'compose' key for accented characters ; source digraphs.rc But it's happenning before reading .vilerc isn't it? -- Chris Green
Always get two windows when using -c
This relates to my recent posting about trying to use the '-c' command line option. However it's now a more general problem/question. Whenever I add a '-c command' (or a '+ command', or a '-g NNN') to the command line vile opens two windows, the file I want is in the first window and the following is in the second (lower) window:- [Reading /home/chris/.vilerc] [Read 66 lines from "/home/chris/.vilerc"] [Reading /usr/share/vile/filters.rc] [Reading /usr/share/vile/modes.rc] [Reading /usr/share/vile/digraphs.rc] [Reading /home/chris/wiki/data/pages/boating/diary/2011/05/20.txt] [Read 2 lines from "/home/chris/wiki/data/pages/boating/diary/2011/05/20.txt"] [Not that many lines in buffer: 20] The error at the bottom is simply because, in this case, I had a '-g 20' on the command line. As I said, it makes no difference what I add to the command line (with -c, + or -g) I always get this second window. How can I prevent this second window from opening? -- Chris Green
Re: Why doesn't this do what I expect?
On Thu, Nov 10, 2022 at 03:50:23PM -0500, Paul Fox wrote: > chris wrote: > > On Thu, Nov 10, 2022 at 08:58:14PM +0100, Gary Jennejohn wrote: > > > vile `cat ^Xe .zot` where .zot contains .bashrc and vile opens .bashrc. > > > > > > ^X = ctrl-V+ctrl-X > > > > > Sadly this won't help me as I'm trying to run this from a panel > > launcher button in [x]ubuntu, thus I can't use any bash, all I can > > have is a plain text command line. > > Why can't you just do: > bash -c "vile $(cat .zot)" > That's exactly what I did try first time around but it didn't work. > Where .zot contains the filename you want to edit? Why do you need > to use "-ce"? > I guess bash -c "vile $(cat .zot)" might work. > Okay, I see you said "plain text command line". In that case, I > suggest you create a tiny script that does what you need, and call > that from the launcher config. > ... and that's exactly what I have done which works. I was just hoping I might be able to get rid of the (admittedly pretty trivial) script. -- Chris Green
Re: Why doesn't this do what I expect?
On Thu, Nov 10, 2022 at 08:58:14PM +0100, Gary Jennejohn wrote: > On Thu, 10 Nov 2022 17:55:49 + > Chris Green wrote: > > > I have a file, called .editfile which contains just a filename, e.g.:- > > > > chris$ cat .editfile > > /srv/wiki/data/pages/telecoms/umidigi.txtchris$ > > chris$ > > > > When I open the file with vile or xvile I see (as expected) the > > filename and I can enter ^X-e to edit the file. > > > > However if I try the following:- > > > > chris$ vile -ce .editfile > > > > I don't get to edit the file whose name is in .editfile, I get > > .editfile in one window and the following in the other window > > (named [Binding List] :- > > > > [Reading /home/chris/.vilerc] > > [Read 66 lines from "../.vilerc"] > > [Reading /usr/share/vile/filters.rc] > > [Reading /usr/share/vile/modes.rc] > > [Reading /usr/share/vile/digraphs.rc] > > [Reading /home/chris/wiki/.editfile] > > [Read 1 line from "./.editfile"] > > > > > > Is there any way I can get this to work as I want? I just want to > > open the file whose name is in .editfile. > > > > I've tried the alternatives of 'edit-file', 'E', 'e' and 'find-file' > > but they all act the same. > > > > Sending to the list since I'm now suscribed using my new email account. > > This works for me: > > vile `cat ^Xe .zot` where .zot contains .bashrc and vile opens .bashrc. > > ^X = ctrl-V+ctrl-X > Sadly this won't help me as I'm trying to run this from a panel launcher button in [x]ubuntu, thus I can't use any bash, all I can have is a plain text command line. -- Chris Green
Why doesn't this do what I expect?
I have a file, called .editfile which contains just a filename, e.g.:- chris$ cat .editfile /srv/wiki/data/pages/telecoms/umidigi.txtchris$ chris$ When I open the file with vile or xvile I see (as expected) the filename and I can enter ^X-e to edit the file. However if I try the following:- chris$ vile -ce .editfile I don't get to edit the file whose name is in .editfile, I get .editfile in one window and the following in the other window (named [Binding List] :- [Reading /home/chris/.vilerc] [Read 66 lines from "../.vilerc"] [Reading /usr/share/vile/filters.rc] [Reading /usr/share/vile/modes.rc] [Reading /usr/share/vile/digraphs.rc] [Reading /home/chris/wiki/.editfile] [Read 1 line from "./.editfile"] Is there any way I can get this to work as I want? I just want to open the file whose name is in .editfile. I've tried the alternatives of 'edit-file', 'E', 'e' and 'find-file' but they all act the same. -- Chris Green
Re: Conditional code possible in .vilerc?
On Fri, Nov 04, 2022 at 04:14:02PM +, Chris Green wrote: > > The only question that remains is why didn't "./configure --prefix=$HOME" > set the default place for the filters files? > Forget it, I'd not cleared out completely before re-building with "./configure --prefix=$HOME". A complete clear out and a clean rebuild and now it works as it should. Sorry for all the noise! -- Chris Green
Re: Conditional code possible in .vilerc?
On Fri, Nov 04, 2022 at 02:35:18PM +, Chris Green wrote: > I run vile on several systems, up until now they have been 'my' > systems where vile is installed in /usr with config files in > /usr/share/vile. > > However I have just installed vile on a system (my cPanel hosting > site) where I just have a user account. I built vile very quickly and > easily to install it in my home directory. > > The (minor) problem is that I have a .vilerc that I share across all > systems that currently does "source /usr/share/vile/filters.rc", this > obviously doesn't work on the new system where it should be "source > ~/share/vile/filters.rc". > > I'd rather not have a custom .vilerc if I can avoid it, is there any > way to code conditionally in the .vilerc to test where the filters.rc > file is? Something like:- > > if exists /usr/share/vile/filters.rc > source /usr/share/vile/filters.rc > else > source ~/share/vile/filters.rc > fi > I think I have come up with an OK solution anyway. Change the line in .vilerc from:- source /usr/share/vile/filters.rc to:- source filters.rc This works fine on my existing systems as the filters are in the default place. Then, on the new system where filters.rc (and other files) are in ~/share/vile I set VILE_STARTUP_PATH to point at them. I already have a mechanism for adding custom .bashrc bits and pieces so this fits in nicely. The only question that remains is why didn't "./configure --prefix=$HOME" set the default place for the filters files? -- Chris Green
Conditional code possible in .vilerc?
I run vile on several systems, up until now they have been 'my' systems where vile is installed in /usr with config files in /usr/share/vile. However I have just installed vile on a system (my cPanel hosting site) where I just have a user account. I built vile very quickly and easily to install it in my home directory. The (minor) problem is that I have a .vilerc that I share across all systems that currently does "source /usr/share/vile/filters.rc", this obviously doesn't work on the new system where it should be "source ~/share/vile/filters.rc". I'd rather not have a custom .vilerc if I can avoid it, is there any way to code conditionally in the .vilerc to test where the filters.rc file is? Something like:- if exists /usr/share/vile/filters.rc source /usr/share/vile/filters.rc else source ~/share/vile/filters.rc fi -- Chris Green
Re: A somewhat off-topic question about ncurses and wrapping long lines
On Sat, Oct 01, 2022 at 06:35:26PM -0400, Thomas Dickey wrote: > On Sat, Oct 01, 2022 at 10:01:00AM +0100, Chris Green wrote: > > Well it's not entirely off topic, it's about something that works as > > I'd expect it to in vile (and less) but doesn't work right in mutt (my > > E-Mail program of choice). > > > > The issue is about how long chunks of text, with no spaces in them, > > are wrapped when they are too long to fit in the terminal width. The > > typical case (and the one that is a particular problem in mutt) is > > that of long URLs. This *isn't* about how these programs manage > > wrapping normal text made up of 'words' with spaces in between. > > > > In less or vile when there is a long piece of text and you have told > > less/vile to wrap long lines then the long URL (or whatever) is > > displayed wrapped at the right margin but it is still a single string > > and you can select it in the terminal by right clicking on it. > > > > In mutt (in mutt's internal pager specifically) however, although the > > URL is displayed the same (i.e. wrapped at the right margin) it's > > actually broken into one or more lines and you *can't* select it by > > right clicking on it, you just get the single line that you click on. > > > > This has been discussed at length at various times on the mutt mailing > > list and hasn't been solved. > > I'm subscribed to mutt-dev (don't recall it there). > Perhaps mutt-user... Yes, it's mutt-users. > > (none of the mutt development gets very deep into this stuff) > > > Is there some specific way of using/calling ncurses which does what we > > want? ... and/or does ncurses default to breaking the string at the > > page margin and need some option to prevent it doing this? > > It's a special case of xterm (imitated by more than one terminal emulator, > though probably not _all_). xterm notices when a line is written and > wraps. Screen updates that simply write to the end of a line (including > a previously "wrapped" line) make it forget about follow part of a line. > I sort of understand. So you're saying that it's the xterm (or similar) that is inserting the LF after mutt has output a long string using ncurses. > less and vile have an advantage over ncurses in deciding if a line is > wrapped -- ncurses can't tell if an application writes text (using one > of the wrapping calls such as waddch) intending to construct a long line. > So vile and less manage the wrapping themselves whereas xterm does it for mutt - is that the difference? I thought vile used ncurses. > Actually, long lines in mutt for me have a "+" marking the beginning > of the following lines (which iirc is configurable). > I have "set nomarkers" in my muttrc which turns the + off. At least one can then manually select the long URL and paste it into a browser address bar (as long as the browser, correctly, inores the embedded LF). However right-clicking the URL would be much handier. > > I'm floundering a bit at understanding this as I'm not really sure > > it's an ncurses issue but it does seem to be pretty much the same > > regardless of other things. I use /usr/bin/xfce4-terminal but the > > same happens to lots of other people and I have tried other terminal > > emulators and seen no change. > > > > Can anyone throw any light on this? > > > > -- > > Chris Green > > > > -- > Thomas E. Dickey > https://invisible-island.net > ftp://ftp.invisible-island.net -- Chris Green
Re: UTF8 has stopped working in vile after OS upgrade
On Fri, Jul 29, 2022 at 04:27:05AM -0400, Thomas Dickey wrote: > On Fri, Jul 29, 2022 at 03:40:12PM +1000, Brendan O'Dea wrote: > > Testing the vile 9.8v-2 package on my Debian machine I get some decidedly > > odd behaviour: > > > > The following sequence: > > > > l- e' c, > > > > is rendered in vile as: > > > > \?A3\?E9\?E7 > > > > outside of vile, in the same terminal that appears fine: > > > > £éç > > > > which would suggest that vile doesn't handle UTF-8 at all, although as > > Chris noted, entering those three characters using C-v x works fine, > > and renders in vile correctly. > > hmm - with some time, I can bisect to pinpoint the problem. > > (pasting outside of 0..255 seems ok) > Weirdly I find that using the vile defined 'compose' key *does* work for accented characters, but using the default 'compose' key (as defined in .Xmodmap) it doesn't work. I.e. I have "source digraphs.rc" in my .vilerc file as follows:- ; ; ; Set up ^K as 'compose' key for accented characters ; source digraphs.rc ... and, rather to my surprise, when I entered ^ke' I got an e with an accute accent. I rarely (if ever) use this in vile, I'd really forgotten it was there. It doesn't work for a pound sign though (^kl=). -- Chris Green
Re: UTF8 has stopped working in vile after OS upgrade
On Thu, Jul 28, 2022 at 07:27:36PM -0400, Thomas Dickey wrote: > On Thu, Jul 28, 2022 at 10:27:05PM +0100, Chris Green wrote: > > ... and further, no compose key sequences work in vile 9.8v whereas > > they do work in vile 9.8u. > > > > E.g. I can't enter accented characters using COMPOSE + e + ' (for e > > with acute accent) or COMPOSE + c + , (for c with a cedilla). > > hmm - in a quick check (without getting into keyboard configuration > or compose), I can reproduce this in my Ubuntu 22.04 machine, > by pasting text selected/copied between xterms(*) > and don't see the problem in the older Debian machine that I'm using. > > So there's something that I can investigate. > Good (or bad I suppose if it's a bug/proble). > At the moment, I'm getting ready for a trip (email yes, development no), > but am supposing that I can dig into this next week :-) > OK, no problem, it's not a major issue and I have workarounds. > (*) something that I can fix. I've noticed that gnome-terminal is really > flakey in Ubuntu 22.04, but _that_ is off-topic. > I use xfce4-terminal pretty much exclusively. Thanks for all your support. :-) -- Chris Green
Re: UTF8 has stopped working in vile after OS upgrade
... and further, no compose key sequences work in vile 9.8v whereas they do work in vile 9.8u. E.g. I can't enter accented characters using COMPOSE + e + ' (for e with acute accent) or COMPOSE + c + , (for c with a cedilla). -- Chris Green
Re: UTF8 has stopped working in vile after OS upgrade
On Thu, Jul 28, 2022 at 09:21:52PM +0100, Chris Green wrote: > Further information... > > I've built vile 9.7 on this system and pound signs work correctly, if > I build vile 9.8 with the same build environment pound signs don't work. > ... and maybe more to the point I've built 9.8u from downloaded source and I've built 9.8v from downloaded source. 9.8u works OK when entering pound signs, 9.8v doesn't work correctly. Note that this error is when I hit the actual pound key on the keyboard, I'm not entering using the CTRL/V sequence. If I enter 'CTRL/V x A 3' then I do get a pound sign. So the problem is something to do with the way that vile is managing the keyboard input. -- Chris Green
Re: UTF8 has stopped working in vile after OS upgrade
Further information... I've built vile 9.7 on this system and pound signs work correctly, if I build vile 9.8 with the same build environment pound signs don't work. -- Chris Green
Re: UTF8 has stopped working in vile after OS upgrade
On Thu, Jul 28, 2022 at 03:15:55PM -0400, Thomas Dickey wrote: > On Thu, Jul 28, 2022 at 11:54:54AM +0100, Chris Green wrote: > > I just upgraded my systems from xubuntu 21.10 to xubuntu 22.04. > > I don't know about "xubuntu", but Ubuntu 22.04 doesn't seem an improvement. > Xubuntu is just Ubuntu with Xfce desktop. I *had* to upgrade to 22.04 as 21.10 is out of support. > > My UTF8 confiuguration in vile and xvile is broken now. > > > > Well, entering pound sterling signs no longer works, here is one:- > > > > � > > > > (That looks a bit like an iso 8859-1 character to me, not sure really) > > > > vile has been upgraded to version 9.8v, all my locale settings are > > unchanged I think, and pound signs seem to be working correctly > > everywhere else. > > Perhaps > > locale -a > chris@esprimo$ locale -a C C.utf8 POSIX en_AG en_AG.utf8 en_AU.utf8 en_BW.utf8 en_CA.utf8 en_DK.utf8 en_GB.utf8 en_HK.utf8 en_IE.utf8 en_IL en_IL.utf8 en_IN en_IN.utf8 en_NG en_NG.utf8 en_NZ.utf8 en_PH.utf8 en_SG.utf8 en_US.utf8 en_ZA.utf8 en_ZM en_ZM.utf8 en_ZW.utf8 chris@esprimo$ env | grep LC LC_CTYPE=en_GB.utf8 LC_COLLATE=C > would show only UTF-8 encoding (vile is designed to know about a combination > of non-UTF-8 and UTF-8, which used to be a problem). I've not changed any of > that for quite a while -- locale support is the first place to check. > > > It's the character *entry* in vile/xvile that's broken, if I create a > > file with pound signs in it and then open it with vile then the pound > > signs display correctly. > > > > -- > > Chris Green > > > > -- > Thomas E. Dickey > https://invisible-island.net > ftp://ftp.invisible-island.net -- Chris Green
UTF8 has stopped working in vile after OS upgrade
I just upgraded my systems from xubuntu 21.10 to xubuntu 22.04. My UTF8 confiuguration in vile and xvile is broken now. Well, entering pound sterling signs no longer works, here is one:- � (That looks a bit like an iso 8859-1 character to me, not sure really) vile has been upgraded to version 9.8v, all my locale settings are unchanged I think, and pound signs seem to be working correctly everywhere else. It's the character *entry* in vile/xvile that's broken, if I create a file with pound signs in it and then open it with vile then the pound signs display correctly. -- Chris Green
Re: Markdown syntax file
On Tue, Jan 04, 2022 at 11:47:28PM +, Gerard Lally wrote: > On Tue, Jan 04, 2022 at 06:35:18PM -0500, Thomas Dickey wrote: > > actually syntax highlighters are relatively easy to code -- but I spend > > all of my time on things that aren't that easy :-( > > I can't even begin to imagine. The documentation for xterm alone is > enough to give me a lifetime of horrors. > > But New Year is an opportune moment to say a sincere thank you for all > the work you do, on vile and other software. > > I am just returning to vile now, but I use other software like xterm all > the time, and am very grateful for it. > Can I add my seasons greetings and thanks for vile too, thank you to all [x]vile maintainers. -- Chris Green
Re: ./configure and flex, or not
On Fri, Jul 30, 2021 at 01:36:10PM +0100, Chris Green wrote: > > > > I guess I could get http://invisible-island.net/reflex, will this provide > > an acceptable flex? > > > There's no yacc for termux, but there is a bison. > > So I have built reflex, will the vile build find that as a [f]lex > replacement or do I need to change reflex to flex? > It 'just works'. So now I have a completely warning free ./configure ... *and* I now get syntax highlighting colours in my ssh session running file on Termux on my 'phone. Don't ask me what was wrong before but an entirely clean ./configure and make seems to have got it working. :-) I have to say the whole process was faster and easier than I remember way back when I was developing C/C++ on Solaris, it's amazing that a 'phone now packs what feels like more computing power than those Solaris workstations did. -- Chris Green
Re: ./configure and flex, or not
> > I guess I could get http://invisible-island.net/reflex, will this provide an > acceptable flex? > There's no yacc for termux, but there is a bison. So I have built reflex, will the vile build find that as a [f]lex replacement or do I need to change reflex to flex? -- Chris Green
./configure and flex, or not
While playing at building vile in Termux on my Android phone I seem to have hit a [minor] problem with flex and its versions. I'm running:- ./configure --build=aarch64-unknown-linux-gnu --prefix=/home/.cfg/bison --with-builtin-filters So, firstly I get these warnings:- ... ... configure: WARNING: You need flex to compile builtin filters checking for library path... $(libdir)/vile checking for startup path... $(datadir) checking if lex supports %pointer... no configure: WARNING: Your lex program does not support POSIX %pointer. Get flex. checking if lex supports character classes... no configure: WARNING: Your lex program does not support POSIX character classes. Get flex. checking if lex supports options... no configure: WARNING: Your lex program does not support POSIX options. Get flex. checking if lex supports states... lex conftest.l 1>&5 configure: WARNING: disabling build for lex-filters ... ... Computing location to install filter programs: $(libdir)/vile configure: WARNING: You should get a working version of flex, for instance: http://invisible-island.net/reflex If I install flex on the system it gives me version 2.6.4 which ./configure says:- ... ... checking if any filters are built-in/loadable... yes checking if flex is really flex... yes checking version of flex... 2.6.4 configure: WARNING: Sorry - your version of flex is too unstable: 2.6.4 checking for library path... $(libdir)/vile ... ... checking for spell... no Computing location to install filter programs: $(libdir)/vile configure: WARNING: You should get a working version of flex, for instance: http://invisible-island.net/reflex checking if filesystem supports mixed-case filenames... yes ... ... I found a long thread about this (flex versions) back in 2016 but it doesn't really help much in actually sorting this out. There isn't a 'flex-old' package available for Termux and, anyway, surely flex version 2.6.4 should be acceptable as it seems to be the standard one I find on all my systems (xubuntu 21.04, ubuntu 20.04, current Raspbian). I guess I could get http://invisible-island.net/reflex, will this provide an acceptable flex? -- Chris Green
Re: Dianosing lack of colour highlighting
On Thu, Jul 29, 2021 at 05:44:38PM -0400, Thomas Dickey wrote: > - Original Message - > | From: "Chris Green" > | To: "Vile mailing list" > | Sent: Thursday, July 29, 2021 5:40:03 PM > | Subject: Re: Dianosing lack of colour highlighting > > | On Thu, Jul 29, 2021 at 10:20:38PM +0100, Chris Green wrote: > |> Well I have vile running OK on my phone running termux but I can't get > |> colour syntax highlighting to work. > |> > |> I feel as if I have copied all the required configuration files across > |> from my Linux systems where colour highlighting works OK, However, no > |> colours. > |> > |> The terminal can display in colours as dircolors works when running ls. > |> > |> So how to diagnose this? > |> > | I've run show-colors and that does show colours so that's a good start. > | > | Looking at the vile help it says I should be doing:- > | > |./configure --prefix=$HOME/local --with-builtin-filters > | > | to get colour. Is that --with-builtin-filters necessary to get syntax > | highlighting? If so it might explain my problem! :-) > > using builtin-filters simplifies the calling interface, eliminates screen > hiccups, > but whether you get color at all depends on the terminal description > (e.g., what's TERM set to?) > Thanks. It's tomorrow morning now. :-) I've just checked and colour is working on the phone's screen itself, it's only in an ssh connection to the phone that it's not working. So that suggests to me that I need to check what TERM is set to on the phone itself.. Hmmm, that's not much help. TERM is set to 'xterm' on the phone itself and, as I said, colour works in vile there. But via an ssh connection (with the client end having TERM=xterm as well) I don't get colour in vile. I do get colour in vile when running across ssh connections to other systems. Why would I see colour directory listings across the ssh interface but not colour within vile across ssh? Whereas colour works for directory listings *and* within vile when run directly on the phone screen. -- Chris Green
Re: Dianosing lack of colour highlighting
On Thu, Jul 29, 2021 at 10:20:38PM +0100, Chris Green wrote: > Well I have vile running OK on my phone running termux but I can't get > colour syntax highlighting to work. > > I feel as if I have copied all the required configuration files across > from my Linux systems where colour highlighting works OK, However, no > colours. > > The terminal can display in colours as dircolors works when running ls. > > So how to diagnose this? > I've run show-colors and that does show colours so that's a good start. Looking at the vile help it says I should be doing:- ./configure --prefix=$HOME/local --with-builtin-filters to get colour. Is that --with-builtin-filters necessary to get syntax highlighting? If so it might explain my problem! :-) -- Chris Green
Dianosing lack of colour highlighting
Well I have vile running OK on my phone running termux but I can't get colour syntax highlighting to work. I feel as if I have copied all the required configuration files across from my Linux systems where colour highlighting works OK, However, no colours. The terminal can display in colours as dircolors works when running ls. So how to diagnose this? -- Chris Green
Re: Has anyone tried compiling vile in termux?
On Thu, Jul 29, 2021 at 01:56:45PM -0400, Paul Fox wrote: > chris wrote: > > I run termux on my phone so I can access my home Linux system's > > command line to read E-Mail, Usenet etc. My home system runs as an > > always on server and gets mail delivered to a traditional mail spool > > by Postfix and also runs 'leafnode' a small NNTP server. Thus I am > > totally independent of gmail or anything like that. > > > > I normally use my laptop to ssh to my home system to read E-Mail and > > Usenet, Termux on Android just gives me a smaller, lighter way to do > > the same if I don't have my laptop with me. > > How is that experience different than, say, using an ssh client (I use > JuiceSSH) to connect to your home system? (And I connect using mosh, > so the connection tends to stay up for days, if not weeks.) > It's just a much more complete 'Linux like' system to run from, I can run the same .profile, .bashrc etc. so it just feels very familiar. It even runs syncthng so I can synchronise files between my home system, the laptop and my Android phone. I have my address database synchronised across the systems and I can find addresses from the command line on the 'phone. Also I have a little collection of encrypted files which are synchronised so I can access them locally. > (I think I was expecting you to describe using termux to navigate > the android filesystem, so you could use vile to edit config files and > ImageMagick to manipulate your photos.) > You can do very little like this, the phone isn't rooted and so Termux is in a pretty tight sandbox like other Android apps. -- Chris Green
Re: Has anyone tried compiling vile in termux?
On Thu, Jul 29, 2021 at 11:21:15AM -0400, Paul Fox wrote: > chris wrote: > > On Thu, Jul 29, 2021 at 04:04:38PM +0100, Chris Green wrote: > > > u0_a166@bison$ ./vile > > > Bad system call > > > > > OK, a quick web search has found a solution, it runs OK in a chroot > > environment:- > > > > u0_a166@bison$ termux-chroot ./vile > > > > I think I now need to rearrange things a bit so I always run termux in > > a termux-root[ed] enviroment. > > > > But anyway that was actually remarkably painless, not a single missing > > library and the fixes needed were fairly trivial. I'm now even more > > impressed with both termux and vile! :-) > > > > > > Sorry for all the noise! > > Don't apologize! Just about anything vile related is nice to > hear about. :-) Especially if it means it's running in some new > oddball environment. I hadn't heard of termux before, so your > monologue was worth it for that, even if for nothing else! ;-) > > (I'm not quite sure what I'd _use_ termux for, but perhaps I'm not > being imaginative enough.) > Thanks for the kind words. :-) I run termux on my phone so I can access my home Linux system's command line to read E-Mail, Usenet etc. My home system runs as an always on server and gets mail delivered to a traditional mail spool by Postfix and also runs 'leafnode' a small NNTP server. Thus I am totally independent of gmail or anything like that. I normally use my laptop to ssh to my home system to read E-Mail and Usenet, Termux on Android just gives me a smaller, lighter way to do the same if I don't have my laptop with me. -- Chris Green
Re: Has anyone tried compiling vile in termux?
On Thu, Jul 29, 2021 at 04:04:38PM +0100, Chris Green wrote: > u0_a166@bison$ ./vile > Bad system call > OK, a quick web search has found a solution, it runs OK in a chroot environment:- u0_a166@bison$ termux-chroot ./vile I think I now need to rearrange things a bit so I always run termux in a termux-root[ed] enviroment. But anyway that was actually remarkably painless, not a single missing library and the fixes needed were fairly trivial. I'm now even more impressed with both termux and vile! :-) Sorry for all the noise! -- Chris Green
Re: Has anyone tried compiling vile in termux?
On Thu, Jul 29, 2021 at 03:41:42PM +0100, Chris Green wrote: [snip my ramblings] > > So what is my 'build type'? > > Aha, a bit of searching suggests that:- > > ./configure --build=aarch64-unknown-linux-gnu > > should work, it seems to be so far! > It all apparently works, the .configure as above completes with no errors and 'make prefix=~/local install' completes with only the expected errors - as follows:- ... ... mv vile ovile mv: cannot stat 'vile': No such file or directory make: [makefile:341: vile] Error 1 (ignored) gcc -g -O2 -g -O2 -o vile tcap.o main.o basic.o bind.o blist.o buffer.o csrch.o display.o dumbterm.o eval.o exec.o externs.o fences.o file.o filec.o fileio.o finderr.o glob.o globals.o input.o insert.o itbuff.o lckfiles.o line.o map.o modes.o msgs.o nullterm.o oneliner.o opers.o path.o random.o regexp.o region.o search.o tags.o tbuff.o termio.o undo.o version.o vl_ctype.o watch.o window.o word.o wordmov.o api.o btree.o history.o isearch.o select.o statevar.o ucrypt.o xterm.o npopen.o spawn.o charsets.o eightbit.o wcwidth.o -liconv -lcrypt -lcurses ** installing vile /data/data/com.termux/files/usr/bin/install -c vile /data/data/com.termux/files/home/local/bin/`echo vile|sed 's,x,x,'` /bin/sh -c "if test NONE != NONE ; then \ cd /data/data/com.termux/files/home/local/bin ; \ rm -f NONE ; \ ln -s `echo vile|sed 's,x,x,'` NONE ; \ echo '... created symbolic link:' ; \ ls -l `echo vile|sed 's,x,x,'` NONE ; \ fi" ** installing vile-pager sed -e 's/=vile$/='`echo vile|sed 's,x,x,'`'/' ./macros/vile-pager >/data/data/com.termux/files/home/local/bin/`echo vile|sed 's,x,x,'`-pager chmod 755 /data/data/com.termux/files/home/local/bin/`echo vile|sed 's,x,x,'`-pager /bin/sh -c "if test NONE != NONE ; then \ cd /data/data/com.termux/files/home/local/bin; \ rm -f NONE-pager ; \ ln -s `echo vile|sed 's,x,x,'`-pager NONE-pager ; \ echo '... created symbolic link:' ; \ ls -l `echo vile|sed 's,x,x,'`-pager NONE-pager ; \ fi" Completed install of program. /data/data/com.termux/files/usr/bin/install -c -m 644 ./vile.1 /data/data/com.termux/files/home/local/man/man1/vile.1 u0_a166@bison$ cd local /data/data/com.termux/files/home/local u0_a166@bison$ ls bin lib man share u0_a166@bison$ cd bin /data/data/com.termux/files/home/local/bin u0_a166@bison$ ls vile vile-pager u0_a166@bison$ ./vile Bad system call Unfortunately, as you can see, it doesn't run. It just says "Bad system call". Does anyone have any suggestions as to what might be wrong? It's compiled the right sort of executable:- u0_a166@bison$ cd /data/data/com.termux/files/usr/bin /data/data/com.termux/files/usr/bin u0_a166@bison$ file ls ls: symbolic link to coreutils u0_a166@bison$ file coreutils coreutils: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, stripped u0_a166@bison$ cd local/bin /data/data/com.termux/files/home/local/bin u0_a166@bison$ file vile vile: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, with debug_info, not stripped Does it just mean that there's a missing dependency that ./configure and make haven't noticed? -- Chris Green
Re: Has anyone tried compiling vile in termux?
On Thu, Jul 29, 2021 at 03:26:06PM +0100, Chris Green wrote: > Has anyone tried building vile under termux? It has a cc, make, etc. :- > > u0_a166@bison$ which cc > /data/data/com.termux/files/usr/bin/cc > u0_a166@bison$ cc --version > clang version 12.0.0 > Target: aarch64-unknown-linux-android24 > Thread model: posix > InstalledDir: /data/data/com.termux/files/usr/bin > u0_a166@bison$ which make > /data/data/com.termux/files/usr/bin/make > u0_a166@bison$ make --version > GNU Make 4.3 > Built for aarch64-unknown-linux-android > Copyright (C) 1988-2020 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > A web search hasn't revealed anything, maybe I'll try myself (it's a > *long* time since I built vile!). > OK, first hurdle failure:- u0_a166@bison$ ./configure checking build system type... ./config.guess: unable to guess system type This script, last modified 2009-12-30, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run (./config.guess) is already up to date, please send the following data and any information you think might be pertinent to in order to provide the needed information to handle your system. config.guess timestamp = 2009-12-30 uname -m = aarch64 uname -r = 4.14.186 uname -s = Linux uname -v = #1 SMP PREEMPT Mon Jun 21 19:56:08 CST 2021 /usr/bin/uname -p = unknown /bin/uname -X = hostinfo = /bin/universe = /usr/bin/arch -k = /bin/arch = /usr/bin/oslevel = /usr/convex/getsysinfo = UNAME_MACHINE = aarch64 UNAME_RELEASE = 4.14.186 UNAME_SYSTEM = Linux UNAME_VERSION = #1 SMP PREEMPT Mon Jun 21 19:56:08 CST 2021 configure: error: cannot guess build type; you must specify one u0_a166@bison$ So what is my 'build type'? Aha, a bit of searching suggests that:- ./configure --build=aarch64-unknown-linux-gnu should work, it seems to be so far! -- Chris Green
Has anyone tried compiling vile in termux?
I am just discovering termux on my Android phone, it's a remarkably complete Linux command line system. It runs an apt type package environment and can do most things one can do on any old Linux system from the command line. It has vim but I find that confuses me as soon as I move to 'more advanced' commands as I'm so used to vile now. Has anyone tried building vile under termux? It has a cc, make, etc. :- u0_a166@bison$ which cc /data/data/com.termux/files/usr/bin/cc u0_a166@bison$ cc --version clang version 12.0.0 Target: aarch64-unknown-linux-android24 Thread model: posix InstalledDir: /data/data/com.termux/files/usr/bin u0_a166@bison$ which make /data/data/com.termux/files/usr/bin/make u0_a166@bison$ make --version GNU Make 4.3 Built for aarch64-unknown-linux-android Copyright (C) 1988-2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. A web search hasn't revealed anything, maybe I'll try myself (it's a *long* time since I built vile!). -- Chris Green
Re: xvile as external editor for Joplin
On Thu, Apr 01, 2021 at 06:51:47PM -0400, Thomas Dickey wrote: > On Thu, Apr 01, 2021 at 04:49:57PM +0100, Gerard Lally wrote: > > Hi. > > > > It is possible to edit notes in the Joplin notes app using an external > > editor. Unfortunately, xvile freezes when I try to do so. > > > > joplinapp dot org > > > > No cursor, scrollbar or menus appear either. How to start troubleshooting? > > hmm - some library conflict, perhaps. I'd make joplin run a shell script > which calls the actual binary xvile, using the shell script to run strace > (to see what files it opens, including the shared libraries). > > Making xvile fork on startup might be a workaround: > > xvile -fork > > > I'm happy to edit using vile + xterm instead, if I know the magic formula! > > xterm -e vile whatever > I wonder if this is related to the issue I had quite a while ago where I wanted to fork/exec xvile from a firefox addon, the addon didn't seem to be able to 'detect' xvile properly. I ended up calling this (horrible) bash script from the firefox addon:- #!/bin/bash rm /tmp/xvlink ln -s $1 /tmp/xvlink cat $1 | xvile -fn 10x20 /tmp/xvlink rm /tmp/xvlink -- Chris Green
Re: Further to the perl/vileget/vileserv saga
On Tue, Feb 09, 2021 at 10:09:00AM +1100, Brendan O'Dea wrote: > On Mon, Feb 08, 2021 at 01:29:13PM +0000, Chris Green wrote: > >I *think* I'm beginning to understand all this, I suspect there's some > >bits of very old history of mine (and of vile) in all this. > > > >Firstly I don't quite know from where I got the following code (which is in > >my .vilerc):- > > > >perl "Vile::register 'dir', 'dir', 'Dir Browser', 'dir.pl'" > > > >perl "Vile::register 'startserv', 'Vileserv::start', \ > >'Start Edit Server', 'Vileserv.pm'" > >perl "Vile::register 'stopserv', 'Vileserv::stop', \ > >'Stop Edit Server', 'Vileserv.pm'" > >startserv > > > >store-procedure exitproc > >stopserv > >~endm > >set-variable $exit-hook exitproc > >setv %vileserv-accept-commands true > > > > [snip] > > >However, while digging into all this I have come across a couple of > >little oddities, mostly in the documentation. > > > >1 - The are references (e.g. in the vileget man page) to a vileserv(3) > >man page. There isn't a vileserv(3) man page, at least not on any of > >my several systems there isn't. I do have a vileget man page though. > >(I know I can generate the vileserv manual page using pod2man) > > Indeed, the docs are a little messy. I'll take a look shortly to see what > needs cleaning up and send Tom a patch. > > The vileserv manual page is not currently installed. In the Debian packages, > it is documented under /usr/share/doc/vile/perl/Vileserv.doc, and a command is > registered to display that from vile as `:vileserv-help'. > > >2 - I don't know where I got the dir.pl bit above, it seems as if it > >should actually be directory.pm. Is there any significance in the > >different suffices .pl and .pm for perl extensions? There is one > >reference to dir.pl in directory.doc which presumably needs changing. > > That is another confusion. There is a doc installed to > /usr/share/doc/vile/dir.doc, and one to > /usr/share/doc/vile/perl/directory.doc. As noted above, I'll see what I can > do to clean that up. > > The difference in `.pl' vs `.pm' is that Perl will use the latter as a default > when `require' is given a bare work (as opposed to a quoted string). That is > the following two lines are equivalent: > > require "foo.pm"; > require foo; > > files with a `.pl' suffix must always be quoted. > > require "foo.pl"; > > >3 - In Vileserv.doc it says all you need to have in .vilerc is:- > >perl "use Vileserv" > >Does this completely replace the lines above I have in my .vilerc? > > Yes. This may have been in flux at the time that you initially added the > lines to your init file. It works as-is, just slightly differently. > > The Vile::register function registers a command with a Perl implementation, > and optionally specifies the file to load it from (deferred until the first > time it is called). This is described in vile-perl-api.doc (typically > installed under /usr/share/doc/vile). > > So the first line: > > perl "Vile::register 'startserv', 'Vileserv::start', \ >'Start Edit Server', 'Vileserv.pm'" > startserv > > says that the command `:startserv' is implemented by the Perl subroutine > `Vileserv::start', which may be loaded from `Vileserv.pm', and the second line > immediately starts the server. > > You also registered `:stopserv', then added a macro and a hook to run that on > exit from vile: > > store-procedure exitproc >stopserv > ~endm > set-variable $exit-hook exitproc > > In Perl, the `use' keyword adds the ability to run some implicit > initialisation code when a module is loaded. At some point (presumably after > you added that stuff to your init file), I added `Vile::Exporter' which > allowed those register commands to be run automatically. If you look at the > top of Vileserv.pm you will see a %REGISTRY mapping which includes the list of > commands to register automatically when the module is loaded. This means > that: > > perl "use Vileserv" > > implicitly binds `startserv', `stopserv' and some other commands. It > additionally uses some magic in the import method to start the server on load, > and in the END method to stop the server at shutdown. > > In short, you can replace all of the snippet quoted above with the following: > > perl "use directory" > perl "use Vileserv" > setv %vileserv-accept-commands true > > Of course if you don't use `
Re: Further to the perl/vileget/vileserv saga
On Tue, Feb 09, 2021 at 11:15:21AM +1100, Brendan O'Dea wrote: > On Mon, Feb 08, 2021 at 01:46:11PM -0600, J. Chris Coppick wrote: > >Do not think the "use Vileserv" replaces those other lines. It does ring a > >bell. I'd have to dig up the docs and code to check what was required for > >what. > > It does, you can pretty easily test it: > > $ echo 'perl "use Vileserv"' >~/vilerc.tmp > $ vile @~/vilerc.tmp > :!vileget /etc/passwd > > at which point you should have a buffer containing /etc/passwd. > > If you're interested in the gory details, the `use Vileserv;' statment in Perl > is equivalent to: > > BEGIN { require Vileserv; Vileserv->import() } > > You can ignore the BEGIN block which just changes the evaluation order (not > relevant given that this evaluation context contains only that statement), the > important part here is the invocation of the `import' method, which in the > case of Vileserv does this: > > https://salsa.debian.org/debian/vile/-/blob/master/perl/Vileserv.pm#L80-83 > > it first calls `Vile::Exporter::import', which is the magic by which every key > in `%REGISTRY' is mapped to a command using `Vile::register': > > https://salsa.debian.org/debian/vile/-/blob/master/perl/Vileserv.pm#L33-38 > > it then starts the server. The `END' block arranges to stop the server on > exit: > > https://salsa.debian.org/debian/vile/-/blob/master/perl/Vileserv.pm#L76-78 > Another thank you, another bit of puzzle answered. :-) -- Chris Green
Re: Further to the perl/vileget/vileserv saga
On Mon, Feb 08, 2021 at 01:46:11PM -0600, J. Chris Coppick wrote: >On Mon, Feb 8, 2021 at 1:25 PM Chris Green <[1]c...@isbd.net> wrote: [snip my ramble] > >All I can tell you for sure at this point is that my memory is no doubt >worse than yours. :) >Do not think the "use Vileserv" replaces those other lines. It does >ring a bell. I'd have to dig up the docs and code to check what was >required for what. >The register commands just set it up so you can stop/start the vileserv >process from the vilerc or the Vile command prompt, e.g. ':startserv' >or ':stopserv'. The startserv cmd is then used to start the vileserv >process. And of course the exit hook setup is meant to not leave the >vileserv process running without an active vile. This was all >intended primary for use with Xvile of course. In theory you would >login, which would launch your X window environment, which would launch >Xvile, and then you would use vileget to load files into the running >xvile either from the command line or even from a file manager. >(Remember X windows? I can't seem to find it on my mac. There's an >Xcode but it doesn't appear to be the same thing... ha ha.) >Regarding your unexpected vileget, have you checked your shell >aliases? Perhaps you have an old 'alias vi=vileget' or similar >lurking somewhere? >Do not recall for sure but very possible that vileget might hang for a >bit if there is no vileserv process running. Might explain the vileget >taking a while to die. >Hope this helps in some small, vague way. :) Yes, thanks Chris, it tells me why the snippet of perl in my .vilerc is the way it is. It is all quite a while ago that this was really important! :-) -- Chris Green
Further to the perl/vileget/vileserv saga
I *think* I'm beginning to understand all this, I suspect there's some bits of very old history of mine (and of vile) in all this. Firstly I don't quite know from where I got the following code (which is in my .vilerc):- perl "Vile::register 'dir', 'dir', 'Dir Browser', 'dir.pl'" perl "Vile::register 'startserv', 'Vileserv::start', \ 'Start Edit Server', 'Vileserv.pm'" perl "Vile::register 'stopserv', 'Vileserv::stop', \ 'Stop Edit Server', 'Vileserv.pm'" startserv store-procedure exitproc stopserv ~endm set-variable $exit-hook exitproc setv %vileserv-accept-commands true Obviously (which I hadn't realised) this always starts vileserv when I run vile. I think it dates from many years ago when it was very handy for me to have this ability where I was working as many people there used the emacs equivalent and the SCCS system was set up to use it. I've used it occasionally since but not very much and I had sort of forgotten about it really. I think my recent "why is that vileget running" may have just been something that ran something that ran something that ran vileget. However, while digging into all this I have come across a couple of little oddities, mostly in the documentation. 1 - The are references (e.g. in the vileget man page) to a vileserv(3) man page. There isn't a vileserv(3) man page, at least not on any of my several systems there isn't. I do have a vileget man page though. (I know I can generate the vileserv manual page using pod2man) 2 - I don't know where I got the dir.pl bit above, it seems as if it should actually be directory.pm. Is there any significance in the different suffices .pl and .pm for perl extensions? There is one reference to dir.pl in directory.doc which presumably needs changing. 3 - In Vileserv.doc it says all you need to have in .vilerc is:- perl "use Vileserv" Does this completely replace the lines above I have in my .vilerc? I know this is all pretty trivial, it's just my OCD wanting to tidy up loose ends! :-) -- Chris Green
Re: The vileget calling code in .vilerc
On Mon, Feb 08, 2021 at 11:34:22AM +1100, Brendan O'Dea wrote: > On Mon, 8 Feb 2021 at 02:45, Chris Green wrote: > > In my .vilerc that I use on several systems I have the following > > towards the end:- > [snip] > > > I only looked at this just recently because I got an unexpected > > vileget running on a little Beaglebone SBC where it took a noticeable > > amount of time to do things. I couldn't make it start unexpectedly > > again though, I'm a bit non-plussed by the whole thing! :-) > > The syntax looks fine to me, and pasted directly into a file and > loaded with "vile @chris.rc" it appears to work fine, with indents as > given. > > I can't test dir.pl, which I don't have, but vileget works as > expected: opening the given file in the running vile instance. > > I wasn't entirely clear by what you meant by "an unexpected vileget" though... > Yes, sorry, I wasn't very clear. I was using vile on a little Beaglebone Black which seemed to be a bit slow and noticed one time when I exited from vile that it waited while it closed down vileget. I wondered why there was a vileget running as I hadn't run it explicitly. I couldn't reproduce the problem, there don't seem to be any vilegets when I edit files now. I just wanted to check that the .vilerc syntax was OK as I hadn't used vileget in a very long time. Thanks all. I must have just done something that started vileget without me noticing. -- Chris Green
The vileget calling code in .vilerc
In my .vilerc that I use on several systems I have the following towards the end:- ; ; ; Add a reStructuredText mode ; ; define-mode rst ; map! ; : ; map! : ; ; ~with define-submode rst ; suf '\.rst$' ; shiftwidth=2 ; ~endwith perl "Vile::register 'dir', 'dir', 'Dir Browser', 'dir.pl'" perl "Vile::register 'startserv', 'Vileserv::start', \ 'Start Edit Server', 'Vileserv.pm'" perl "Vile::register 'stopserv', 'Vileserv::stop', \ 'Stop Edit Server', 'Vileserv.pm'" startserv store-procedure exitproc stopserv ~endm set-variable $exit-hook exitproc setv %vileserv-accept-commands true ; ; ; Set up ^K as 'compose' key for accented characters ; source digraphs.rc The commented out reStructuredText mode is fine, it's just an aide-memoire, the ^K bit at the end is OK too. However the bit in between looks a bit odd, if only because of the indenting. Have I lost anything over the years or is it just the indenting is awry? I know I just slavishly copied the code when I first inserted it so I'm not really clear how it all works. I only looked at this just recently because I got an unexpected vileget running on a little Beaglebone SBC where it took a noticeable amount of time to do things. I couldn't make it start unexpectedly again though, I'm a bit non-plussed by the whole thing! :-) -- Chris Green
Problem building/compiling
I am trying to compile vile on a web hosting system where I have a Linux ssh login account. The C preprocessor is problematic:- bash-3.2$ pwd /var/sites/o/oasis41.co.uk/tmp/vile-9.8 bash-3.2$ ./configure checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu Configuring for linux-gnu checking for gcc... gcc checking for C compiler default output... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for executable suffix... checking for object suffix... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking how to run the C preprocessor... /lib/cpp configure: error: C preprocessor "/lib/cpp" fails sanity check bash-3.2$ Are there any obvious things to try in order to get round this problem? Alternatively is there a way to create an executable image which includes all libraries etc., like appimage format? The system reports its architecture etc. as:- bash-3.2$ uname -a Linux shell3.gridhost.co.uk 2.6.32-754.27.1.el6.x86_64 #1 SMP Tue Jan 28 14:11:45 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux -- Chris Green
Re: Fonts for xvile in linux - where to find some nice ones?
By the way, to conclude this thread (maybe) I noticed I had added an item to my .vilemenu:- C:Other Fonts B:Terminus 12:setv $font -*-terminus-medium-*-*-*-12-*-*-*-c-*-iso10646-* B:Terminus 14:setv $font -*-terminus-medium-*-*-*-14-*-*-*-c-*-iso10646-* B:Terminus 16:setv $font -*-terminus-medium-*-*-*-16-*-*-*-c-*-iso10646-* B:Terminus 17:setv $font -*-terminus-medium-*-*-*-17-*-*-*-c-*-iso10646-* B:Unifont 16:setv $font -*-unifont-medium-*-*-*-16-*-*-*-c-*-iso10646-* B:Unifont 17:setv $font -*-unifont-medium-*-*-*-17-*-*-*-c-*-iso10646-* They didn't work, but on looking in the Ubuntu repositories I found 'xfonts-terminus' which I had obviously installed in the past but lost when upgrading/re-installing. So I have installed xfonts-terminus and they're somewhat better than the defaults available, for me anyway. -- Chris Green
Re: Fonts for xvile in linux - where to find some nice ones?
On Wed, May 06, 2020 at 03:25:52PM -0400, Thomas Dickey wrote: > On Thu, May 07, 2020 at 01:11:30AM +1000, Brendan O'Dea wrote: > > There is quite a bit of difference in how traditional X11 bitmap fonts > > and freetype fonts are selected and rendered > > (https://utcc.utoronto.ca/~cks/space/blog/unix/XFontTypes gives a > > reasonable summation) but the main thing is that from the API level > > they are not interchangeable. XTerm has specific code to handle > > rendering of fonts selected via -fn (server bitmap) vs -fa (client > > rendered scalable). I don't believe that xvile has handling for the > > latter, so is limited to traditional server provided bitmap fonts. > > agreed - the APIs are very different. There was no _technical_ reason > that they had to be incompatible... > > Having both in xterm makes it complicated. If/when I find time to > do TrueType for xvile, it'll be one or the other at configure/make > time. > That would be OK, what will distributions/repositories do though? > However, I mostly use vile in xterm, and after _that_, winvile. > I mostly use vile in a terminal, it's just that *occasionally* (such as marking rectangular areas with the mouse) xvile is very handy. -- Chris Green
Re: Fonts for xvile in linux - where to find some nice ones?
On Wed, May 06, 2020 at 07:32:21AM -0400, Paul Fox wrote: > chris wrote: > > On Tue, May 05, 2020 at 06:54:48PM -0400, Thomas Dickey wrote: > > > On Tue, May 05, 2020 at 10:43:47PM +0100, Chris Green wrote: > > > > I am always hitting this issue, the current fonts available by default > > > > in standard Linux repositories for xvile are generally horrible. Does > > > > anyone here have any nice ones, or can anyone point me at some nice > > > > ones. > > > > > > There's two sets of fonts in the default menu for xvile. > > > The first looks like the bitmap fonts used for xterm, > > > while the other is b lucidatypewriter -- > > > > > > you might find this as > > > bitmap-lucida-typewriter-fonts > > > or > > > xfonts-100dpi > > > xfonts-75dpi > > > > > Yes, I have all of those, I was just hoping/wondering if anyone has > > created different/better bitmap fonts. They're OK[ish] on my desktop > > machine but I can't find anything that is really comfortable to use on > > my laptop. > > I haven't thought about fonts in a long time. Is it the case that > xvile can't use the same fonts that xterm uses? I don't use xvile, > but I'm pretty happy with my fixed xterm fonts. > xvile is stuck with the old and rarely renewed/maintained fixed bitmap fonts in /etc/X11/fonts whereas vile can use all of the standard terminal fonts to be found in /usr/share/fonts. I'm not sure if xterm can use the 'ordinary' system fonts in the same way that other terminal emulators can, I use the default xfce4-terminal that comes with the xubuntu distribution that I use and that shows me dozens (if not hundreds) of different fonts to choose from. -- Chris Green
Re: Fonts for xvile in linux - where to find some nice ones?
On Tue, May 05, 2020 at 06:54:48PM -0400, Thomas Dickey wrote: > On Tue, May 05, 2020 at 10:43:47PM +0100, Chris Green wrote: > > I am always hitting this issue, the current fonts available by default > > in standard Linux repositories for xvile are generally horrible. Does > > anyone here have any nice ones, or can anyone point me at some nice > > ones. > > There's two sets of fonts in the default menu for xvile. > The first looks like the bitmap fonts used for xterm, > while the other is b lucidatypewriter -- > > you might find this as > bitmap-lucida-typewriter-fonts > or > xfonts-100dpi > xfonts-75dpi > Yes, I have all of those, I was just hoping/wondering if anyone has created different/better bitmap fonts. They're OK[ish] on my desktop machine but I can't find anything that is really comfortable to use on my laptop. Thanks anyway. -- Chris Green
Fonts for xvile in linux - where to find some nice ones?
I am always hitting this issue, the current fonts available by default in standard Linux repositories for xvile are generally horrible. Does anyone here have any nice ones, or can anyone point me at some nice ones. I tend to revert to using vile a lot of the time because I can use the systems GUI fonts as opposed to the very limited X fonts. However I'm just doing something again which is much more suited to xvile. -- Chris Green
Re: Crash with unmatched patterns
On Sat, Jan 11, 2020 at 09:36:25AM -0800, Marc Simpson wrote: > Hitting n or N after searching for an unmatched pattern with / or ? > crashes vile. > > To reproduce: > > /\( > > Vile reports > > [Bad pattern: unmatched () ] > > which is all well and good. Then hit > > n > > to attempt searching again (for the bad pattern); this should > reproduce the crash. > Doesn't happen for me, running version 9.8t on xubuntu. When I hit n after the unmatched one I just see "Search reached bottom without matching patter". -- Chris Green
Re: I need a reminder on how to sort a section of text
On Thu, Dec 26, 2019 at 12:08:25PM -0800, Marc Simpson wrote: > On Thu, Dec 26, 2019 at 11:43 AM Chris Green wrote: > > > > It's been too long since I did this and I can't remember the way to do > > it. > > > > I want to sort a block of lines of text. > > you can use the ! operator with a motion, e.g. > > 1G!Gsort > > which will move to the first line, and sort through the end of file > (last line, G). with marks 'a' and 'b' set, that would be: > > 'a!'bsort > > alternatively, you can do everything from the command prompt. > assuming you have the same two marks set: > > :'a,'b!sort > > will do the trick. > Thanks Marc! :-) -- Chris Green
Re: [vile] Possible locations for vile.keywords
On Wed, Aug 01, 2018 at 12:45:50PM +0100, Brendan O'Dea wrote: > Tracing the execution of opening a file in cmode via "vile @filters.rc > foo.c" shows that the following files are attempted in order: > > ./.vile.keywords > ~/.vile.keywords > ~/.vile/vile.keywords > /usr/share/vile/vile.keywords > ./.c.keywords > ~/.c.keywords > ~/.vile/c.keywords > /usr/share/vile/c.keywords > > so ~/.vile.keywords should work. Does it not? Yes, it does, I've just tried it. It hadn't occurred to me before to handle vile.keywords this way, much handier than the way I was doing it before. It's the vile help file that pushed me towards the way I was doing it. It was the references to COLORDIR that suggested that there might be a better way - and there is. Has the COLORDIR stuff been added to the help file fairly recently (like in the last few years!)? Thanks anyway, using ~/.vile.keywords is a much better way. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] How can I run xvile like "gvim -f"?
On Mon, Dec 11, 2017 at 04:51:19PM -0500, Thomas Dickey wrote: > On Mon, Dec 11, 2017 at 08:32:13PM +0000, Chris Green wrote: > > On Mon, Dec 11, 2017 at 01:47:54PM -0500, Paul Fox wrote: > > > hy...@lactose.homelinux.net wrote: > > > > Chris Green writes: > > > > >On Mon, Dec 11, 2017 at 01:06:47PM +, Chris Green wrote: > > > > >> I am invoking xvile from a firefox extension (textern if anyone is > > > > >> interested, it's a replacement for "It's all text" which doesn't > > > work > > > > >> on Firefox 57 or newer). > > > > >> > > > > >> For this to work xvile needs to stay in the foreground when invoked, > > > > >> i.e. it needs to to what gvim does with "gvim -f". Is there any way > > > > >> to get it to do this or will I need some sort of wrapper? > > > > >> > > > > >To be more explicit I need xvile to not detach from the calling > > > > >process. This is so that the caller blocks until xvile exits. > > > > > > > > I guess I don't understand what you're asking. When I run xvile, > > > > the program stays in the foreground and the shell waits for the > > > > program to end. If that's what you're asking for, then as far as I > > > > can tell, the answer is "It does that by default." > > > > > > i just said the same thing privately to chris -- forgot to cc: the list. > > > > > ... and here's my reply (copied back to the list):- > > > > > i guess i'm a little confused, now that i've actually fired up xvile. > > > > > > if i start xvile from a shell, the shell waits for it to exit. if i > > > start xvile with "xvile -fork", then it doesn't wait -- i.e., i get a > > > fresh prompt. > > > > > You're right! So what does +fork do? ... or is it just the default > > behaviour? > > +fork tells xvile to NOT fork and set a new process group. > > > Whatever it doesn't do the same as 'gvim -f'. > > > > > do you perhaps have an X resources file that's changing xvile's behavior? > > > > > No, as above I think mine works the same as yours. The question is > > how do I make it do what 'gvim -f' does (and what is that?). > > "xvile +fork" should work. But since it's not, I'd suggest finding why > xvile exits early. For that, I'd use strace (if you're running on a > Linux system - seems that strace's "maintainer" removed other platforms > a while back). By making the extension call a shell script which logs > the system calls to xvile, you can spot where the program gives up: > > #!/bin/sh > strace -s 1024 -o trace.log xvile +fork "$@" > > Perhaps the extension sends xvile a SIGHUP or something like that, and > gvim ignores it. > It doesn't give up, the xvile window opens and stays open but it never has control. No text appears in the window, no menus, nothing. ... and you can't exit either, you have to kill it. Running xvile from an xterm (using a wrapper script) works OK. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] How can I run xvile like "gvim -f"?
On Mon, Dec 11, 2017 at 01:47:54PM -0500, Paul Fox wrote: > hy...@lactose.homelinux.net wrote: > > Chris Green writes: > > >On Mon, Dec 11, 2017 at 01:06:47PM +, Chris Green wrote: > > >> I am invoking xvile from a firefox extension (textern if anyone is > > >> interested, it's a replacement for "It's all text" which doesn't work > > >> on Firefox 57 or newer). > > >> > > >> For this to work xvile needs to stay in the foreground when invoked, > > >> i.e. it needs to to what gvim does with "gvim -f". Is there any way > > >> to get it to do this or will I need some sort of wrapper? > > >> > > >To be more explicit I need xvile to not detach from the calling > > >process. This is so that the caller blocks until xvile exits. > > > > I guess I don't understand what you're asking. When I run xvile, > > the program stays in the foreground and the shell waits for the > > program to end. If that's what you're asking for, then as far as I > > can tell, the answer is "It does that by default." > > i just said the same thing privately to chris -- forgot to cc: the list. > ... and here's my reply (copied back to the list):- > i guess i'm a little confused, now that i've actually fired up xvile. > > if i start xvile from a shell, the shell waits for it to exit. if i > start xvile with "xvile -fork", then it doesn't wait -- i.e., i get a > fresh prompt. > You're right! So what does +fork do? ... or is it just the default behaviour? Whatever it doesn't do the same as 'gvim -f'. > do you perhaps have an X resources file that's changing xvile's behavior? > No, as above I think mine works the same as yours. The question is how do I make it do what 'gvim -f' does (and what is that?). -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] How can I run xvile like "gvim -f"?
On Mon, Dec 11, 2017 at 01:31:11PM +, Chris Green wrote: > On Mon, Dec 11, 2017 at 01:06:47PM +0000, Chris Green wrote: > > I am invoking xvile from a firefox extension (textern if anyone is > > interested, it's a replacement for "It's all text" which doesn't work > > on Firefox 57 or newer). > > > > For this to work xvile needs to stay in the foreground when invoked, > > i.e. it needs to to what gvim does with "gvim -f". Is there any way > > to get it to do this or will I need some sort of wrapper? > > > To be more explicit I need xvile to not detach from the calling > process. This is so that the caller blocks until xvile exits. > ... and even more, 'xvile +fork' doesn't seem to do what I need. 'gvim -f' works, 'xvile +fork' doesn't work. Help!? -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] How can I run xvile like "gvim -f"?
On Mon, Dec 11, 2017 at 01:06:47PM +, Chris Green wrote: > I am invoking xvile from a firefox extension (textern if anyone is > interested, it's a replacement for "It's all text" which doesn't work > on Firefox 57 or newer). > > For this to work xvile needs to stay in the foreground when invoked, > i.e. it needs to to what gvim does with "gvim -f". Is there any way > to get it to do this or will I need some sort of wrapper? > To be more explicit I need xvile to not detach from the calling process. This is so that the caller blocks until xvile exits. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
[vile] How can I run xvile like "gvim -f"?
I am invoking xvile from a firefox extension (textern if anyone is interested, it's a replacement for "It's all text" which doesn't work on Firefox 57 or newer). For this to work xvile needs to stay in the foreground when invoked, i.e. it needs to to what gvim does with "gvim -f". Is there any way to get it to do this or will I need some sort of wrapper? -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] How to turn off syntax colouring in .txt files?
On Fri, Nov 03, 2017 at 10:58:21AM -0700, Marc Simpson wrote: >I believe > define-submode txt suffixes '' >will do the trick. I just tried that, it had no effect when done within vile while editing a file. ... however adding it to my .vilerc file has done the trick, thank you! -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
[vile] How to turn off syntax colouring in .txt files?
Is there a quick and easy way to turn off text highlighting in .txt files? I edit a lot of DokuWiki files directly with vile and xvile and the colouring is just distracting as it's often a bit random because of the DokuWiki syntax. I'd be happy with either turning off colours on .txt files completely or a quick command I can issue to turn it off. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] Is there any folding/hiding ability in [x]vile, or any add-on to do it?
On Sun, Oct 29, 2017 at 10:11:46AM -0400, Thomas Dickey wrote: > - Original Message - > | From: "Chris Green" <c...@isbd.net> > | To: vile@nongnu.org > | Sent: Sunday, October 29, 2017 9:51:22 AM > | Subject: [vile] Is there any folding/hiding ability in [x]vile, or any > add-on to do it? > | > | As per the subject, is there any sort of 'folding' or 'hiding' ability > | in vile or xvile? > | > | I want to edit some files which need a few lines of 'code' at the top > | and a line at the bottom that I would like to hide while editing so > | that I can just see the 'business' content. > > Generally I'd do something like that using a script which splits out the > editable part, > and reassembles the pieces. > Yes, I suspect that's probably the way to go. There's some very specific markers I can use to decide what to get rid of and then put back afterwards. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
[vile] Is there any folding/hiding ability in [x]vile, or any add-on to do it?
As per the subject, is there any sort of 'folding' or 'hiding' ability in vile or xvile? I want to edit some files which need a few lines of 'code' at the top and a line at the bottom that I would like to hide while editing so that I can just see the 'business' content. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] How to use map! to enter 'special' UTF8 characters?
On Fri, Mar 17, 2017 at 08:06:56PM +1100, Brendan O'Dea wrote: > On 17 March 2017 at 19:55, Chris Green <c...@isbd.net> wrote: > >> Try mapping it to ^Vu2714. That worked for me. > >> > > That's *exactly* what I have done, it shows correctly (as above) in > > .vilerc but when I hit F4 in insert mode while editing I see the > > string â\u009C\0094. I can insert a ✔ by typing CTRL/V + u + 27 + 14 > > though, it displays OK in vile. > > Don't map it to the *value* of ^Vu2714, map it to that sequence of > characters. i.e. your .vilerc should contain a ^V and the following > characters, *not* the tick character. Obviously you need to type > "map! # ^V^Vu2714" when editing .vilerc to get that single literal ^V. > Of course! ... or at least I think so. :-) Anyway it works now, thank you. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] How to use map! to enter 'special' UTF8 characters?
On Fri, Mar 17, 2017 at 10:06:15AM +1100, Brendan O'Dea wrote: > On 17 March 2017 at 09:08, Chris Green <c...@isbd.net> wrote: > > I'm trying to set up a single key to enter a 'tick'. The UTF code for > > this is u2714. I can successfully enter the character in vile using > > ^Vu2714 but I can't get a map! to enter the character for me. > > > > I have put the following in my .vilerc:- > > > > map! #4 ✔ > > map! #5 ABCDE > > > > The F5 key works, it inserts ABCDE but F4 gives me ✔. > > Try mapping it to ^Vu2714. That worked for me. > That's *exactly* what I have done, it shows correctly (as above) in .vilerc but when I hit F4 in insert mode while editing I see the string â\u009C\0094. I can insert a ✔ by typing CTRL/V + u + 27 + 14 though, it displays OK in vile. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
Re: [vile] Is there a simple way to view special keys in insert mode?
On Thu, Mar 16, 2017 at 04:44:51PM -0400, Thomas Dickey wrote: > On Thu, Mar 16, 2017 at 04:02:01PM +0000, Chris Green wrote: > > Is there a simple way to see which keys are mapped to special > > functions in insert mode? > > :describe-insmode-bindings > > > :map! shows me a list of the multi-key sequences but doesn't seem > > to tell me about ^T or ^V for example. > > I see ^T in describe-cmdmode-bindings, but ^V is the quote-next character > which shows up in show-terminal-chars > show-terminal-chars shows some of what I need. I can't see ^T anywhere. Surely describe-cmdmode-bindings is showing things in command mode, I want to know the 'special' characters in insert mode. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile
[vile] Is there a simple way to view special keys in insert mode?
Is there a simple way to see which keys are mapped to special functions in insert mode? :map! shows me a list of the multi-key sequences but doesn't seem to tell me about ^T or ^V for example. -- Chris Green ___ vile mailing list vile@nongnu.org https://lists.nongnu.org/mailman/listinfo/vile