Emojis not shown in gtk(?) but in kde applications using the same font - vim

I noticed that Emojis like 😀 are not displayed in gvim on my system but they are in terminal vim if that is used in an xterm or konsole. And yes I tried many guifonts capable of displaying them (noto mono, noto color emoji, hack). I also noticed that vim in gnome-terminal doesn't display them either (although using the same fonts in it as in the other terminals). In fact I haven't found a single gnome(?) or gtk(?) application that displays them - not even when I use a gnome X-session. On the other hand no kde app has problems with them. Searching the web I got the impression that, e.g. gnome-terminal should have been able to display emojis for quite some time now. As I use a rolling distribution (openSuse tumbleweed) my software should be pretty recent. So what am I missing? Is there a specific package I need to handle emojis in gtk?
Update
I created test user on my system with default settings. To my big surprise if I log on to the X-system as that user emojis are displayed just fine in gvim. So it must be a configuration issue. Then I went back and logged into my normal account, used su testuser and then opened gvim. I could still see the emojis. I don't want to reset my configuration as I put a lot of effort to have the system behave the way I like it to. But I am at a loss in finding the responsible setting. Any ideas?

Finally, I found the culprit and wanted to share my insight here so that others with similar problems know where to look. In ~/.config/fontconfig/ there were three files I did not put there myself. I guess they were leftovers from some configuration tool. Using a rolling release distribution there are probably many orphaned files in my ~/.config directory. Anyway, after deleting those files and logging out and back on I can now see emojis in gvim etc.

Related

how to launch evince at 100% zoom, or other pdf-viewing solution

I'm going through a bunch of PDFs viewing and then renaming.
I want to open each PDF at 100% zoom when I double-click it from nautilus. Currently it opens at 59%. I have to resize the window every time.
The application seems to call itself "Document Viewer". As far as I can tell, this is an unhelpful indirect name for evince. But I am not sure, because GNOME as a whole is trying to be "clever" about everything.
I've tried "Save Current Settings as Default", but that doesn't have the desired effect.
I've also tried gsettings set org.gnome.Evince.Default zoom 1.0 based on eg https://askubuntu.com/questions/606838/configure-evince-to-open-maximized-with-100-zoom-level . The gesttings command did not produce an error. But nor did it change evince's behaviour.
I'm open to a generic X11 solution, and reserving an area of the screen for this. I'm also open to a solution involving evince, or how nautilus launches it, or a different graphical shell or PDF viewer. Preferably applications available with debian 10.
Ideally I'd like a graphical shell which can give 100% previews and inline renames with F2. This would give a quick workflow for view-renaming whole folders of scanned papers one after the other.
I'd also be interested in socio-cultural explanations of the confluence of factors that resulted in such a severe and basic failure: opening a PDF from the graphical file browser does not result in a readable rendering, and requires the user to resize the window.
Screen is 3840x2160.
"Save Current Settings as Default" works for me on F33. I didn't change any of the other Gnome settings. I use a couple of different monitors with different resolutions and it doesn't give me any issues. I don't know if Debian handles Evince differently; I haven't used Debian for ages. Not a lot of help, sorry.

How to set up the apps key in conemu so it doesn't open the mintty menu

I use Conemu and Cygwin at home and at work, and I was trying to get the keyboard and highlighting to behave the same way in both places, so I imported my home Conemu settings file into my work Conemu, and now I've lost my ability to use Apps+PgDn/PgUp to scroll the backbuffer. Instead, when I press the Apps key, the mintty menu pops up.
How do I get that back?
I finally figured out that the problem is mintty.exe. I think they changed it in Windows 10 so the Apps/Menu key makes the context menu pop up, and there doesn't seem to be any way to disable that. I'm using Windows 8 at work and Windows 10 at home, hence the disparity.
If you just set your task to run bash.exe, everything seem to work fine.
Now that I figured it out, I can see why running mintty.exe in ConEmu doesn't make much sense, since they're kind of competing products, both designed to be better alternatives to cmd.exe.
There are only a couple of differences:
bash.exe has no way to specify an icon, but that easily fixed by putting /icon "C:\cygwin\Cygwin-Terminal.ico" (or whatever your cygwin icon path is) in ConEmu's task parameters.
The color scheme is also different, but appending -new_console:P:"<Standard VGA>" to the task command makes it the same as mintty.exe's (I want ConEmu to run Far Manager with the <Solarized> color scheme).

Python IDLE GUI not starting

I feel like I have been coming the internet for days with absolutely no result.
I have taken some web programming classes, and would like to learn some python, just because programming is wicked interesting altogether, and have run into a fairly large hurdle given my experience.
the problem is this: Python.exe (or is is more properly pythonw.exe?) v3.3.3, running on windows 8.1 used to launch fine. Typed up a simple program to roll various sided die, worked out well. Then I changed the key bindings for 'Run Module' from 'ctrl+f5' to 'crtl+alt+spacebar.'
As soon as I did this IDLE crashed and so did the shell. Now the process will not run AT ALL. I cannot access it through the desktop icon to go back and revert the settings. I also attempted to look at the .def files and change it from there but could not find the 'run module' command. It looked like all the key bindings in the .def files were for the shell.
When I double click, nothing, when I run as admin, nothing. run from the start menu, nothing. I uninstalled and re-installed, rebooted, everything low tech I can think of. Now i'm out of my element and could use one of you brilliant social programmers!!
I've found information about checking with some tool called 'Windows Process Manager' some stuff about what to do with the CMD prompt (something about a path problem ...it intuitivly sounds like I very well could have created a 'path problem' but I'm not 100% I know what that is exactly).
I'm sorry for the lack of links, the pages were farther back in my browsing history than I expected. Hopefully i'm not asking an instant many down vote question here, most of the resources online are for either an older version of windows, Lunix, or an older version of python (which is actually where the path problem hint came from)
Thanks any and all greatly for any time spend reading/answering.
Immensely appreciated.
Find file HOME/.idlerc/config-keys.cfg, where on Win7 HOME would be 'C:/Users/yourloginname', and delete the key binding or, if there is nothing else in the file or nothing you want to keep, the whole file.
If you were to run Idle from a console with python -m idlelib, you would probably see an error message. (Yes, you were probably running with pythonw, as when using the start menu or icon. This works better in 3.4.2 and I am working or more improvements.)
I do not know the specific reason for your crash. I set Zoom-height to --space, restarted, and it works, no problem.

How can I get vim to draw lines correctly for remote editing?

I'm attempting to edit files on a remote system. I've ssh'd to the system and I start editing with vim.
However, I notice that all the lines are drawing 2 lines above where they really exist in the file. I assumed this was a problem I could fix by dropping my terminal settings to something simpler, but that didn't help.
My TERM variable was set to xterm-color. I set it to vt100, but that didn't fix the line drawing issue. I also noticed that this seems to be specific to vim. emacs doesn't show the problem, and I haven't noticed any odd drawing artifacts in less, more or other paging tools.
Other specifics: I'm ssh-ing into the remote system from a Mac, using the Terminal.app. The remote system is running Ubuntu 9.04.
I'm hoping there is something I just need to set in vim to get it to play nice. If it allows me to keep syntax color highlighting, so much the better.
Zhaojun's suggestion works. Setting TERM=xterm is clearing things up.

Reasons for using command line Vim versus GUI Vim [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Background
I'm building an application where it detects what documents you're using from the file system. To do this it must access the AXDocument attribute of the active window. MacVim provides this. Running Vim in the Terminal wouldn't provide this.
I've just put out a survey to ask what editor coders who are interested in my app use. A significant number of the folk using Vim used it directly from the command line.
Why not use a GUI Vim?
Why do some people prefer to run Vim this way versus a GUI implementation like MacVim?
What advantages does this offer? As I understand it, you can send files to MacVim from the command line just as easily as command line Vim.
These reasons may be different for each specific developer but my guess would be:
vim is pretty much vim on any platform. GUI implementations can
vary.
Familiarity - being familiar with vim does not nessecarily mean
being familar with vim wrapped ina
GUI - espectially given #1.
"Elite Complex" ;-)
No definite avantages to the users over cli vim.
One might not have access to a gui (think ssh) or simply force of habit.
Although I don't use any feature exclusive to the GUI version (never touch the mouse while editing) I find GVIM more pleasing to the eye for fonts rendering and color management. So the only reason to use the cli version is not having access to a graphic environment (like when accessing a remote machine via ssh). Using GVIM also allows reuse of the terminal it was called from without having to use screen.
being able to run vim under screen provides
reliability: it will stay alive if X or the terminal app crashes. not sure how applicable this is to the Mac.
the option to multiplex sessions within terminal tabs. I actually end up rarely using terminal tabs because of this. It's possible (albeit a bit confusing) to set up heirarchical screen sessions and move branches of them around. screen is super awesome. This also provides an additional layer of text buffering in which you can search by regexp — this is useful if you spawn a shell command that is pages long and you're looking for a particular word in there.
the ability to connect to an existing session from another computer or reconnect after a network outage
and friends
in addition to making it possible to use screen, the console vim provides better shell integration. Although it's possible to run shell commands from within gvim (again, I'm not sure how this applies to the Mac, I'm a linux guy), there are limitations. I rarely use a gui vim so I'm not sure about the exact limits. For example, ANSI color codes are removed. I find this annoying because I tend to interact with SCM that way, for example running :!git diff --cached to check the changes in the index before committing. It makes for a somewhat quicker and more satisfying (mmm, diffy!) read if it's colourized.
I used to feel that gvim was a big improvement for viewing diffs, but I've changed the background colour of my terminal to a dark non-black shade, and set
:highlight DiffAdd ctermbg=Black
:highlight DiffChange ctermbg=Black
:highlight DiffDelete ctermbg=Black
:highlight DiffText cterm=Bold ctermbg=None
The result of this is that in diff mode, differing text shows up with a black background, and unchanged text is coloured with the terminal background colour. For side-by-side diffs, this works wonderfully, since you can tell immediately based on the other side whether a given line is a change or add; for non-side-by-side you will be able to see an unchanged part in a changed line.
This means that you can leave syntax colouring on and still be able to see diffs. Again, you do need to be able to set the background colour of the terminal to a unique, dark, non-black shade. This facility is available in the terminal emulators that I use (yakuake/konsole and roxterm) and many others.^[?Mac^M"mya)^O^Op
This also assumes that you're using a colourscheme meant for use with a dark background colour; I use a modified delek.
Although I haven't tried this, there is also the option to run console vim in 256-colour mode on terminals which support that mode — which I believe includes most or all modern ones. This can serve to make much of the subtlety of GUI colorschemes available to console vim.^["mp
I also like it that it lives in the place where it was started, and starts up quick. So if I'm navigating around in the shell, as per my wont, I can edit a file without interrupting that flow or having to farm that operation out to a different piece of conceptual real estate. Having less things to keep track of is a big plus. Being able to background it is helpful, too, for example if I need to grab the contents of an unexported shell variable via xclip. If I'd spawned a GUI window instead I might have some trouble remembering where that shell was, or might have already closed it.
My main reason for using a gui vim at all is that it makes somewhat more sense as something spawned from a gui app, eg a browser. In practice I never do this, and I suspect that it's fairly equivalent to just have a new terminal window pop up with a new console vim in it. Though there is likely some (window manager) window management functionality that is exclusive to gui implementations. This is pretty similar to the use case you're discussing.
gvim is actually just a basic terminal emulator with vim running in it, and some menus and toolbar buttons up the top.
So if you have a good, full-featured terminal emulator already, you may as well use that instead, since you'll be using the same type of terminal window that you are familiar with across all your terminal sessions.
Another benefit is that it makes it easy to switch to a shell inside vim and then switch out seamlessly.
On Windows I prefer gvim. On Linux it's vim inside gnome-terminal, which is nice and configurable thankyou.
To avoid (or at least minimize) the use of the mouse.
some gvim variations can't handle
some of my hotkeys
some spawn separate window when i try
to compile program
sometimes they simply can't use fonts
like fixed or terminus correctly
(think about "terminus bold" - some
gvim variations simply stretch
"terminus normal" instead of
rendering with the separate font)
cli generally works faster than gui,
especially if running in real
textmode console (not possible on a
mac though)
there are almost no benefits in using
GUI version, and i'd loose ability to
run in screen, ssh, to suspend
process with ctrl+z, and many more.
The main reason I use the command line is that I spend most of my day in a terminal already, and my use of vim reflects this. I do not open up vim for a long while just editing different files then opening others without closing it; I usually open a file or two do a few edits then do some command line tasks, maybe change a directory, and open up vim somewhere else. When using the a gui there is substantial lag when opening the editor. This wouldn't bother me if I opened it once and left it open but I tend to not work that way. So the command line works better for my workflow. Furthermore since there is no real benefit feature-wise of the GUI over the command line and vise-versa, I've always just stuck with the command line since it suited me better.
vim is way more performant with huge files (100-500MB .csv or .xml files in my case).
gvim beats vim hands-down when used to compare files (gvimdiff): setting the font (want more content on the screen?), dragging the window split line (want to see more of one file rather than the other) etc.
Other than that, I haven't seen other mayor differences and use gvim except when working with large files because I find it more handy in a graphical environment (gnome).
Speed of rendering
proper shell integration with
suspend (C-z),
alternate terminal,
uniform copy/paste
nicer quickfix integration (all external programs run inside your terminal, instead of popup windows... )
network agnostic: can run over ssh
using GNU screen, can detach/attach session over internet;
To the sometimes mentioned 'downside':
mouse support is up to par with :se mouse +=a; this enables selection, window border dragging with the mouse, even over GNU screen over ssh
Pair coding via vim + gnu screen is the selling point for me. I work in screen/vim all day, it allows people to remote into my screen session and we can both edit files fluidly. It's so hot right now.
As a big vim user myself, although I know about GUI vims, I don't use them just out of habit.
I've been using vi since 1990, switched to vim a few years ago but still call it through an alias (alias vi=vim).
For me its just habit. vim works well as it is. Perhaps the gui offers more and I should explore it, but vim works just the way I expect it to and want it to.

Resources