Re: [OT(?)] Ubuntu 18 now defaults to 4-space tabs

2019-09-13 Thread Tobias Klausmann
Hi! 

On Mon, 09 Sep 2019, Tobiah wrote:
> We upgraded a server to 18.04 and now when I start typing
> a python file (seems to be triggered by the .py extension)
> the tabs default to 4 spaces.  We have decades of code that
> use tab characters, and it has not been our intention to
> change that.
> 
> I found a /usr/share/vim/vim80/indent/python.vim and tried
> moving it out of the way, but the behavior was still there.
> 
> I know I can put a modeline in every file but I was hoping
> to do it for every user and for every file.

This might be a generic change (i.e. not Python-specific). The
option that makes vim convert tabs to spaces is "expandtab":

'expandtab' 'et'boolean (default off)
local to buffer
In Insert mode: Use the appropriate number of spaces to insert a
.  Spaces are used in indents with the '>' and '<' commands and
when 'autoindent' is on.  To insert a real tab when 'expandtab' is
on, use CTRL-V.  See also :retab and ins-expandtab.
This option is reset when the 'paste' option is set and restored when
the 'paste' option is reset.
NOTE: This option is reset when 'compatible' is set.

I'd search their top-level vimrc for this. If you don't want to
bother or worry that your changes will be overwritten, you can
put "set noexpandtab" in your .vimrc (user-level).

Hope this helps,
Tobias

-- 
Sent from aboard the Culture ship
GCU Just Another Victim Of The Ambient Morality

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/20190910080946.GA28211%40skade.schwarzvogel.de.


Re: How to set comment character as double dash in front of formatted text?

2017-10-10 Thread Tobias Klausmann
Hi! 

On Tue, 10 Oct 2017, Igor Forca wrote:
> NOW TO THE PROBLEM:
> In my coding language comment is not # but instead
> double dash: --
> 
> I should probably set some setting for formatting
> to tell which character is comment or similar.
> 
> Is it possible to set double dash is a comment for formatting?

My suspicion is that you're editing Lua. If I do so (with
ft=lua), what you describe just works. E.g. having this:

-- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod 
tempor incididunt ut labore et dolore magna aliqua.

And using gq} will result in this:

-- Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
-- tempor incididunt ut labore et dolore magna aliqua.

So my suspicion is that your vim doesn't recognize what you're
editing as being Lua. What does ":set ft" return?

Regards,
Tobias


-- 
Sent from aboard the Culture ship
Gravitas... Gravitas... No, Don't Help Me, I'll Get It In A Moment...

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "sudo vim example" and "vim example"

2017-08-25 Thread Tobias Klausmann
Hi! 

On Fri, 25 Aug 2017, Maksim Yugai wrote:
> Can someone help me? I saved vim config file into ~/.vim/vimrc.
> And when I use "vim example" all settings are working, but when
> I use "sudo vim example" - it doesn't work! Looks like problem
> with privileges. =) 
> 
> Use Debian Stretch. 

Well, if vim is run with sudo, it runs as root and uses root's
settings (vimrc etc). What you probably want is sudoedit. It
copies the file you want to edit and launches the default editor
on it. Once you quit, it copies the file back with propepr
permissions etc.

HTH,
Tobias

-- 
-- 
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Favourite Terminal for use with vim ?

2013-03-01 Thread Tobias Klausmann
Hi! 

On Fri, 01 Mar 2013, Erik Christiansen wrote:
 On 26.02.13 20:11, Tobias Klausmann wrote:
  Also, urxvt can be compiled to be very, very small, which
  some people prefer for whatever reason. 
 
 Now that can be good to know. (I went for Debian with LXDE on
 my laptop, to speed up booting, for example.)

The thing about urxvt in this regard is mostly modularity. In the
configure phase, you can remove a _lot_ of stuff. Here's a
comparison to rxvt from the FAQ:

http://pod.tst.eu/http://cvs.schmorp.de/rxvt-unicode/doc/rxvt.7.pod#Isn_t_rxvt_unicode_supposed_to_be_sm

That said, I don't agree with all of the author's notions of
what a terminal needs. Then again, I can get what I want out of
it, so I'm a happy camper.

Regards,
Tobias

-- 
printk(Illegal format on cdrom.  Pester manufacturer.\n);
linux-2.2.16/fs/isofs/inode.c

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Favourite Terminal for use with vim ?

2013-02-26 Thread Tobias Klausmann
Hi! 

On Wed, 13 Feb 2013, Erik Christiansen wrote:
 programmer and for banging out posts within mutt. I've heard of people
 preferring urxvt, but never figured out why.

For a long time, urxvt's unicode support was multiple orders of
magnitude better than xterm's (as in: xterm didn't have any). If
you use more than the 26 Latin chars used in ASCII English in your
everyday language, proper first-order support is important. Since
you're an old fart like me: Unicode support was/is the modern
equivalent of being 8-bit clean.

Also, urxvt can be compiled to be very, very small, which some
people prefer for whatever reason. 

Regards,
Tobias

-- 
Sent from aboard the Culture ship
GCU Only Slightly Bent

-- 
-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
vim_use group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Deactivating ESC

2012-11-25 Thread Tobias Klausmann
Hi! 

On Sat, 24 Nov 2012, Tobias Pflug wrote:
 i was talking to a friend recently who had remapped capslock to ESC on his 
 macbook. While the capslock key is indeed easier to reach the problem lies 
 with the muscle memory and the years of reaching for ESC ;-)
 
 Now the question is, can you somehow deactivate/remap the *actual* ESC key 
 leaving capslock untouched ? I can't very well map ESC to NOP because 
 capslock is then obviously mapped to NOP as well. Any ideas on this ?

If you want to get rid of the classic ESC key /for all of X11/,
you could use xmodmap/xkeycaps to make a modmap that you load on
startup. I've been using something similar to make the right alt
key a compose key. 

Regards,
Tobias


-- 
Sent from aboard the Culture ship
In One Ear

-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Simple way to add local spell file for a limited set of filesystem locations

2012-07-27 Thread Tobias Klausmann
Hi! 

On Mon, 16 Jul 2012, Tobias Klausmann wrote:
 I'll definitely give it a go this week (yay, vacation time) and
 report back.

Definitely works. Had a bit of an issue with filetypes -- the
code for the spell file was not executed for my tex files, even
though syntax highlighting worked correctly. When I hand-added
ft=tex to the file's modeline, the code got executed.

So I checked what auto-detec ft vim used -- plaintex. I'm not
entirely sure what the purpose of this extra filetype is, but I
can live with setting the ft=tex via the modeline.


Regards,
Tobias

-- 
printk(%s: Boo!\n, dev-name);
linux-2.6.19/drivers/net/depca.c

-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: Simple way to add local spell file for a limited set of filesystem locations

2012-07-16 Thread Tobias Klausmann
Hi! 

On Mon, 16 Jul 2012, Andy Wokula wrote:
  While I'm sure I could come up with a vim script to do all of
  this, I'd very much prefer to use something already done. My vim
  script skills are wy rusty and why reinvent a wheel (badly at
  that). Even better would to achieve this (or some close
  approximation) using vim options.
 
 The following is from the help:
[...] 
 = what you want should be possible.
 
 You could add to  ~/.vim/after/ftplugin/tex.vim:
 
  let b:spellfile = expand('%:p:h'). '/myspell.latin1.add'
  if filereadable(b:spellfile)
  let l:spf = b:spellfile
  else
  setl spf=
  endif
 
 This lets each tex file use the spell file myspell.latin1.add from its
 directory.  Example assumes encoding latin1, and that setting the
 option does not create the spell file yet ...
 
 or (with b:undo_ftplugin):
 
  let b:spellfile = expand('%:p:h'). '/myspell.latin1.add'
  if filereadable(b:spellfile)
  let l:spf = b:spellfile
  let b:undo_ftplugin .= '|setl spf'
  endif
  let b:undo_ftplugin .= '|unlet! b:spellfile'
 
 (warning: almost untested)
 
 Vim automatically creates the .spl files.

I'll definitely give it a go this week (yay, vacation time) and
report back.

Thanks a lot for coming up with this :)

Regars,
Tobias

-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Simple way to add local spell file for a limited set of filesystem locations

2012-06-29 Thread Tobias Klausmann
Hi! 

I do a fair amount of LaTeXing, across a wider selection of
subjects. Since most of these subjects have their own jargon, I
usually add quite a few words to my local spell files (using zg).

The problem is that since there are a lot of acronyms, there is a
good chance that the spellchecker misses a typo because it is a
proper word/acronym in a different context/document.

So ideally, I'd be able to have a spell file per directory (this
would also make using version control easier). All this while
still using the user-global spell file in ~/.vim.

Algorithmically:

- Load system-global word lists*
- Load word lists from runtimepath*
- if there is a possibly empty local spellfile conforming to some
  naming scheme, load it, implicitly creating the .spl file

When spellchecking
- When using zg/zw, use local-to-directory spell file, keeping
  .spl up-to-date, of course.

If there is no dir-local spell file, just use the user-global
file (usually in ~/.vim).

While I'm sure I could come up with a vim script to do all of
this, I'd very much prefer to use something already done. My vim
script skills are wy rusty and why reinvent a wheel (badly at
that). Even better would to achieve this (or some close
approximation) using vim options.

Regards,
Tobias

-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: vim and encryption

2010-08-27 Thread Tobias Klausmann
Hi! 

On Thu, 26 Aug 2010, ZyX wrote:
 Текст сообщения:
  Ответ на сообщение Re: vim and encryption,
  присланное в 22:08:06 25 августа 2010, Среда,
  отправитель Tobias Klausmann:
  
  1. All options either exist in current vim session or not. This cannot be
  changed.
  2. ``echo exists(key)'' echoes 1 as expected. ``exists(key)'' is a
  check for either global or local to function varible ``key'', not for an
  option. 3. You can check for availability of encryption with
  ``has(cryptv)''. But this will not let you check whether file is
  encrypted.
  4. What you want is probably ``if !empty(key)''. My vim echoes five stars
  when I set key and nothing when key is empty. Though five stars are not
  your password, but they are definitely not an empty string, so empty(key)
  will return 0 if key is not set.
  
 Sorry, !empty(key) will return 0 if key is not set.

Thanks! That works the way I wanted it to.

Regards,
Tobias

-- 
Sent from aboard the Culture ship
LOU (Killer Class) Attitude Adjuster

-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: vim and encryption

2010-08-27 Thread Tobias Klausmann
Hi! 

On Thu, 26 Aug 2010, Andrei Popescu wrote:
  I'd like to use vim to keep an encrypted file of sensitive data.
  I'm aware of the implications of keyloggers, exchanged binaries
  and the fact that my text file is still unencrypted in memory
  (and may even go to disk if it's large enough to be swapped).
 
 Have a look at the gnupg plugin ;)

When I was still using GnuPG 1.x, I used that plugin and I liked
it very much. Unfortunately, GnuPG 2.x wants to employ en
external program to ask for the passphrase (usually pinentry).
Since I most often use this encrypted-file functionality
remotely, I can't use pinentry-qt or -gtk, having to rely on
pinentry-curses. But if I want to use that in conjunction with
the GnuPG plugin, pinentry and vim start fighting over the
terminal and it either doesn't work at all or my passphrase is
echoed back to me. I tried finding a solution for this a few
years back (when I swichted to GnuPG 2.x) but never found one.
And no, using gpg-agent is not an option (for sundry other
reasons).

Regards,
Tobias

-- 
Sent from aboard the Culture ship
LOU (Killer Class) Attitude Adjuster

-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: vim and encryption

2010-08-25 Thread Tobias Klausmann
Hi! 

On Wed, 25 Aug 2010, ZyX wrote:
 On Wed, 25 Aug 2010, Tobias Klausmann wrote:
  All that said, I'd still like to use it this way. What I have
  been unable to accomplish is keeping vim from writing a viminfo
  file. At first I tried this in vimrc:
  
  if exists(key)
   let viminfo=
  endif
  
  This does not work. Also, using set noviminfo and let
  viminfo=n/dev/null won't work either. In all cases, my edit
  commands were recallable after quitting vim and starting it
  again.
 You forgot to add an ampersand: you should use either
 set viminfo=
 or
 let viminfo=
 . Now you are setting only global variable g:viminfo.

Done that, no luck though: apparently, checking for the existance
of key does not work - the variable's contents is hidden as
the help text explains. Unfortunately, this also means that
exists() doesn't see it in this case. Thus, I need another way of
detecting that vim is in encryption mode.

Any ideas?

Regards,
Tobias


-- 
Sent from aboard the Culture ship
GSV (Plate Class) The Anticipation Of A New Lover's Arrival

-- 
You received this message from the vim_use maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: IntelliSense for C#

2009-04-08 Thread Tobias Klausmann

Hi! 

On Wed, 08 Apr 2009, Chris Bannister wrote:
 Unfortunately that will delete your sig.

Which is why I use this:
map F2 :.,/^-- $/g/./d^MI-- ^M^[kk

Yes, there's quite probably some room for improvement, there.

Regards,
Tobias
-- 
Found on a small utility knife in MIT's lab supply:
Caution.  Blade is sharp.  Keep out of children.

--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



Re: vim, screen, rxvt-unicode and colors

2008-10-28 Thread Tobias Klausmann

Hi! 

On Mon, 27 Oct 2008, Matt Wozniski wrote:
  Here's my problem. I like 8-color schemes. Unfortunately, my
  terminal of choice (urxvt) only supports 88 colors (t_Co=88).
  Thus, most colorschemes revert to their 8-color behaviour or
  simply do nothing, neither of which is what I want.
 
 You might like my CSApprox plugin, check it out:
 http://www.vim.org/scripts/script.php?script_id=2390

I will definitely give it a shot (on those systems where I can't
control screens behaviour (enough) with the solution below).

  The most excellent colorscheme desert256 is both to my liking
  and works well in plain urxvt. It's when screen is involved that
  things go south. Screen tells vim that t_Co is 8 which is not
  only wrong, but also ugly. If I tell vim by hand that t_Co is 88,
  things become trippy but not beautiful. With t_Co=256 it looks
  almost like the default case without screen (close enough for me,
  anyway).
 
 screen doesn't tell vim that t_Co is 8, screen tells vim that the
 terminal type is screen and vim looks that up and figures out that
 the screen terminal supports 8 colors.  The way to fix this is to
 configure screen to advertise the terminal type more accurately by
 putting something like
 
 term screen-256color-bce
 
 in your ~/.screenrc.  You might need to install this terminfo entry -
 on Debian/Ubuntu, you can do that by installing the ncurses-term
 package, other distros will vary.  If nothing else, you can look up
 how to decompile the terminfo entry on a system that has it, copy the
 plain text version to the system that doesn't have it, and recompile
 it there.

That works (nearly[0]) perfectly, thanks a bunch! I hadn't know
screen has this 256-color mode and needs to be told to
advertise it. But I do see how some machines without the proper
terminfo/termcap entries might barf so the screen devs went for a
safe default.

  - Whose fault is this?
  - How do I fix it?
 
 Hope that helps, but if you need more help feel free to ask.

Oh it does work very well. Now I only need to find out why one
machien is still a bit stupid about term colors, but that might
be a genuine bug in urxvt on 64 bit machines. Unfortunately, I
only have sporadic access.

Thanks again,
Tobias

PS: Bill, I appreciate your input and it made it *nearly* work
(modulo the machine mentioned above), so thanks to you, too, of
course!

-- 
: You are in a dark room with a compiler, vi, an internet connection,
: and a thermos of coffee.
: Your move ?

--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---



vim, screen, rxvt-unicode and colors

2008-10-27 Thread Tobias Klausmann

Hi! 

First off, I realize that while vim is involved in my problem, it
may not be the culprit. Still, this mailing list is one of the
most civilized and helpful I know (can't say that for all of the
fora for the other involved software), so I'll start here.

Here's my problem. I like 8-color schemes. Unfortunately, my
terminal of choice (urxvt) only supports 88 colors (t_Co=88).
Thus, most colorschemes revert to their 8-color behaviour or
simply do nothing, neither of which is what I want.

The most excellent colorscheme desert256 is both to my liking
and works well in plain urxvt. It's when screen is involved that
things go south. Screen tells vim that t_Co is 8 which is not
only wrong, but also ugly. If I tell vim by hand that t_Co is 88,
things become trippy but not beautiful. With t_Co=256 it looks
almost like the default case without screen (close enough for me,
anyway). 

I have prepared several screenshots to illustrate what happens:

http://eric.schwarzvogel.de/~klausman/screen_and_vim/

The names should be self-explanatory.

What I'd like to have is the look of urxvt_vim_t_Co_88.png in the
default case of screen (i.e. instead of
urxvt_screen_vim_t_Co_8.png)

So what I wonder about is this:

- Whose fault is this?
- How do I fix it?

Regards  TIA,
Tobias

-- 
panic(%s: CORRUPTED BTREE OR SOMETHING, __FUNCTION__);
linux-2.6.6/fs/xfs/xfs_bmap.c

--~--~-~--~~~---~--~~
You received this message from the vim_use maillist.
For more information, visit http://www.vim.org/maillist.php
-~--~~~~--~~--~--~---