Windows10: _gvimrc guifont settings not taking effect - windows

I'm using windows 10. I've been trying to change my font and font size to be easier on the eyes for gvim, and all my settings (syntax, ruler, numbers) work normally from my _vimrc file. I currently have
set guifont=Consolas:h12:cANSI
set guifont=Consolas\ 12
in both my _vimrc and _gvimrc files (both in $HOME). When I load :scriptnames, it shows that ~/_vimrc is loaded first and ~/_gvimrc loaded last. I have also tried
set guifont=Consolas:h12
instead of
set guifont=Consolas:h12:cANSI
Still, everytime I open vim or gvim everything is displayed in that horrid size 7 Fixedsys font. Only when I manually go to Edit->Select Font... can I actually effect a change on the font, but the next time I open vim/gvim the changes are not saved. The funny thing is when I enter :set guifont? it tells me that
guifont=Consolas 12
but the font is definitely still at Fixedsys 7. What is going on?

What worked for me is embedded in #nperson325681's answer but not made explicit. In W10 the correct font setting turns out to be your first instruction
set guifont=Consolas:h12:cANSI
but not
set guifont=Consolas\ 12
(although the latter works for me in Linux, and is what I've seen in Vim documentation and help files). So, as #nperson325681 implicitly suggests, take out the second set guifont in your _vimrc. What your set guifont? shows does correctly reflect what your _vimrc has instructed; it simply isn't what works in W10. What I ended up doing is:
if has('win32') || has('win64')
set guifont=Consolas:h10:cANSI:qDRAFT
else
set guifont=Consolas\ 10
endif
Hope that helps.

If you have two set guifont lines in your rc, the last will win. Try with the first line only.
After you have selected a font using the dialog, you can copy-paste the exact and correct line to your gvimrc by typing in insert-mode <C-r>=&guifont<CR>

Related

Current line text font size gets increased while typing in Xcode

While I am typing on a specific line in workspace, the text present in the particular line's font is getting increased ! And it gets to regular size as soon as I stop typing.
I also upgraded to XCode 8.2 still the same issue occurs.
FYI:
I have also tried the following code to reset the XCode default settings, but still no use.
defaults delete com.apple.dt.Xcode
Solution:
This happens when you change font size for one particular element but the other editor's elements are using the previous/default font size.
If you want to change the font size either press cmd + or in preferences -> Fonts and Colors choose your theme and in the right pane select all the elements (press cmd a) and then change the font size.
See this SO answer
I had a similar problem but I am not sure is exactly the same.
Did you try to change this settings?
Xcode preferences > Fonts & Colors Your chosen theme will have a
"current line" option just under the font. Can't remember exactly but
I think you can find something there.

vim displays content of file with #-signs

I used vim to open a file event.txt and show me some search results. This worked fine, but since I did a change in the _vimrc it displays the file content with #-signs so that it is unreadable. See image below.
What I did change in _vimrc was
set fileencoding=utf-8
but I commented it. So it should not affect vim.
"set fileencoding=utf-8
The file is still displayed unreadable. With other editors I can open the file and view it normally. I had this behaviour some time ago, but I vanished somehow. I can't remember.
The event.txt file is the windows event file which I generate through the powershell:
get-eventlog -logname system > event.txt
Something tells me it's not the change in the _vimrc and perhaps something else, but this is the last change I remeber I did and after this it did not work.
How can I view in vim the windows event file event.txt normaly? Without #-signs.
That ÿþ at the beginning is a byte order mark (BOM), typical for Windows Unicode text. The ^# is Vim's representation of a NUL value, and it (roughly) appears as every second character. So, you have a (mostly) ASCII-text file, encoded in UCS-2 little endian: each character is represented by two bytes (16 bit), the lower one comes first.
You can open that file with
:edit ++enc=ucs2-le event.txt
But it's better to set up Vim correctly so that it automatically detects it. Since you're using GVIM on Windows, I would recommend to put
:set encoding=utf-8
at the start of your ~/.vimrc. This will automatically set your 'fileencodings' to a good default of ucs-bom,utf-8,default,latin1. Note the first element; that should help detect the file.
Do not set 'fileencoding' in your ~/.vimrc! That is a buffer-local setting, and it will be automatically set by Vim on opening of the file. The 'fileencodings' (note the plural) is the right option to influence the detection.

Font sizes print smaller than indicated

I am wondering why a 12 point Arial font, displayed on-screen in Mathematica, delivers output to my printer that is measureably smaller than 12 points when compared to output from other programs? I realize there has been some discussion of this behavior over in the Mathgroup moderated email list through the years, but I just haven't heard/read any really satisfying answers to this.
Now that I am using Mathematica 8.0.1 (Windows 7 64 bit) the behavior seems even worse. I have set the option inspector to use 16 point Arial, which is printing more like 10 point Arial.
Has anyone else noticed this behavior? Is there an obvious solution or work-around? I have even tried setting the magnification to 1.25 under the PrintingOptions portion of Option Inspector, and nothing changed, the printed output remained too small.
I believe a typical style sheet has different settings for each "environment" (working, printout, slideshow, et cetera).
Try setting: File > Print Settings > Printing Environment to Working
If you require different styles for screen and printing (Working and Printout) you can edit the style sheet sections for the Printout environment to fine tune your results:
When Printing the default Screen Environment is "Printout". The reason for the mentioned behavior is that the "Printout" environment style has by default Magnification->0.8 which means that everything is printed at 80 % of the original size:
You can change this behavior for a particular notebook by choosing the menu item "Format"->"Edit Stylesheet..." and then creating in the opened window "Style definitions for your_notebook_name" a cell with the following content:
Cell[StyleData[All, "Printout"],
Magnification->1]
I just found a solution to this which seems to completely change the onscreen view to the one that actually prints out.
You go 'File', 'Printing Settings', 'Show Page Breaks'.

Backspace doesn't work in gvim 7.2 64-bit for Windows?

I just installed the 64-bit zipped version for Windows of gvim on my new machine at work, and I changed some settings to make it compatible with Visual Studio 2010.
Now the backspace key doesn't work for some reason.
Here's my .vimrc file:
set nowrap
set ruler
set encoding=utf-8
set fileencoding=utf-8
set ff=dos
It's only a minor annoyance (the delete key works), but I was just wondering if anybody knew.
Does it entirely not work, or does it just not backspace past where you went into insert mode? There's an option backspace which controls this:
Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
mode. This is a list of items, separated by commas. Each item allows
a way to backspace over something:
value effect
indent allow backspacing over autoindent
eol allow backspacing over line breaks (join lines)
start allow backspacing over the start of insert; CTRL-W and CTRL-U
stop once at the start of insert.
owen_water's suggestion is the same as Carpetsmoker's comment, enabling all three of these. That's generally what people want, since it's a bit surprising to have Vim refuse to let you backspace text that's right there. So take your pick of the two equivalent choices - I'd go with the more verbose and clear one:
set backspace=2
set backspace=indent,eol,start
In some cases, bad terminals can mess with backspace and delete, but I doubt that's your problem in Windows. There is some ability to fix this; see :help fixdel.
never use vim in Windows, but I have meet the same problem before in open solaris.
Just try:
set backspace=2

Can I change the size of the Xcode IDE fonts?

I'd like to change the font size of the "Groups & Files" panel of the Xcode IDE. I know how to change the "Fonts & Colors" in the preferences, but those (seem to) only affect the code window, not the rest of the IDE. Any ideas? Thanks!
I believe you can change the size of the Groups & Files pane by setting the PBXTableFontSize parameter in ~Library/Preferences/com.apple.Xcode.plist. This needs PBXTableFont to be set first to take effect.
1) Run defaults write com.apple.Xcode PBXTableFontSize 20 in Terminal, substituting 20 for whatever value you wish to use.
2) Run defaults write com.apple.Xcode PBXTableFont Helvetica in Terminal, substituting Helvetica for the font you wish to use. I'm not sure what OS X's default Sans Serif font is, but Helvetica is pretty generic.
I also wanted to do so. It's ridiculously small!
No, I don't believe this is possible - unless you want to start hacking away at XCode's internal structure. I'd file an enhancement request on this.

Resources