On Sun, Jun 04, 2006 at 03:11:10PM EDT, A.J.Mechelynck wrote: > cga2000 wrote: > >Is there any way the "tilde lines" that represent empty lines at the end > >of the buffer can be changed to something else or removed altogether? > > > You may change their colour. If you set bg and fg to the same value, > they will become invisible. For instance: > > :hi NonText cterm=NONE ctermbg=bg ctermfg=bg gui=NONE guibg=bg guifg=bg > I had tried something similar
:hi NonText ctermbg=black ctermfg=black and it didn't work. I ran a quick test and you also have to specify cterm=NONE for the above to work. But then the help file specifies the following under "cterm": Use only one of "cterm=" OR "ctermfg=" OR "ctermbg=". > Note that the same highlight group also governs the @ or @@@ for a > partial line at the end of a window, and possibly other things too. I had thought of that while experimenting - although I have no idea what the "@" and "@@@" are .. or the "partial lines". Is there any way I can query vim to find out what a group (?) like NonText actually covers? > >Is there any was the "statusline" can be displayed systematically? As > >far as I can tell it only materializes when I split the display. > > > see ":help 'laststatus'". :set laststatus=2 will make it always visible. Thanks, this is exactly what I need. > >Is there any way I can have the contents of a buffer displayed a couple > >of columns to the right of the (sub)window's border? I currently specify > >"set foldcolumn=" but that doesn't appeear to be what it was meant for > >so I was wondering whether there might be a better way. > > > I don't understand what you're trying to do. Maybe ":help 'number'" or > ":help :vsplit" will give you ideas. Sorry.. trying to keep my posts short.. What I mean is that when you display anything in vim - source program, doc, vim help file.. etc. the text starts in column one as you would expect but this means that it is right next to the window/terminal's edge - rather than leaving a narrow margin of 1-2 columns, which would make the display look a lot nicer and improve legibility. When using vertical split with for instance the vim help in the rightmost window, the first character of each line that starts in column one actually touches the VertSplit line without a single intervening pixel. As to the left window the text is flush against the laptop's frame and depending on the colorscheme that I use and ambient light I can actually see this first character's reflection on the dark plastic of the display's encasing. So what I thought was that a narrow margin would make the display look a lot nicer and enhance legibility. So pretty much along the lines of your "invisible tildes" trick above, I tried setting foldcolumn to two and looking for some :hi way of making sure that the fold column is not visible - same color as my display's background. But just as you mentioned for the NonText group, I was concerned using foldcolumn for something it was not meant for might have some hidden and unwanted side-effects. Interestingly, with :set nu the problem is resolved: one empty column separates the line numbers from the text. But then I don's really want line numbers when I'm looking at a help file for instance. > >Is there any way I can have vim display the hex contents of a buffer? I > >currently do a "ggVG :!od -t x1z -w32" followed by "u" to revert back to > >a regular view but maybe there is a more straightforward way to achieve > >the same result. > > > see ":help hex-editing" .. hmm .. the best part is the one that says that vim is not really meant for it.. :-) Thanks, cga