Re: Tweaking syntax highlighting

2024-03-16 Thread A. Wik
On Fri, 15 Mar 2024 at 17:59, Christian Brabandt wrote: > > > On Fr, 15 Mär 2024, A. Wik wrote: > > > I have: > > colorscheme blue > > set background=dark > > hi Error guifg=darkgrey guibg=lightred gui=underline > > \ctermfg=

Tweaking syntax highlighting

2024-03-15 Thread A. Wik
the "hi ..." statement in the .vimrc. The problem is that the "hi ..." doesn't seem to work if run from .vimrc, but it works when I run this manually: :hi Error ctermfg=darkgrey ctermbg=lightred Am I doing something wrong here? Regards, Albert Wik. -- -- You recei

Re: Matching a non-match

2021-10-14 Thread A. Wik
Hi all, On Wed, 13 Oct 2021 at 14:36, Tim Chase wrote: > > On 2021-10-11 23:45, A. Wik wrote: > > > or if you want to match the entire line, you can use: > > > > > > /^\%(\%(exim.input\)\@!.\)*$/ > > > > > > That breaks down to

Re: Matching a non-match

2021-10-11 Thread A. Wik
Thanks to all who replied to my thread! On Sun, 20 Dec 2020 at 17:30, Tim Chase wrote: > > On 2020-12-20 11:09, A. Wik wrote: > > Browsing a directory listing, sometimes I hit lines like these: > > ./spool/exim/input/1FM8sl-4n-Ix-H > > ./spool/exim/input/1FM8sn-

Matching a non-match

2020-12-20 Thread A. Wik
Hi all, Browsing a directory listing, sometimes I hit lines like these: ./spool/exim/input/1FM8sl-4n-Ix-H ./spool/exim/input/1FM8sn-4u-OF-D ./spool/exim/input/1E9dsQ-4f-MO-D [... thousands of similar lines ...] How can I use "/" to find the next line not matching the above pattern? I

Re: Matching words within X lines [PS]

2020-12-10 Thread A. Wik
On Thu, 10 Dec 2020 at 16:32, Gabriele F wrote: > > Well if you want only from "future" I don't know, but if instead you > want "the whole line containing > the match, as well as the whole of the next line" > ":g/future.*ref.*\n.*\n/p 2" seems to give that result, and only if > there is a match (y

Re: Matching words within X lines [PS]

2020-12-10 Thread A. Wik
On Wed, 9 Dec 2020 at 19:35, Gabriele F wrote: > > On 07/12/2020 13.59, A. Wik wrote: > > Now, I want to do the following > > :redir @m > > :g/future.*ref.*\n.*\n > > :redir END > > > > Alternatively, instead of redir, I can use [...]/y M at the e

Re: Setting file encoding in a modeline

2020-12-10 Thread A. Wik
On Thu, 10 Dec 2020 at 13:43, Christian Brabandt wrote: > > > On Do, 10 Dez 2020, A. Wik wrote: > > > It seems to me that a modeline would be a convenient place to set the > > encoding used for a file. However, while it does set 'fenc' > > according

Setting file encoding in a modeline

2020-12-10 Thread A. Wik
It seems to me that a modeline would be a convenient place to set the encoding used for a file. However, while it does set 'fenc' accordingly, the file is not loaded and displayed according to this setting. Bram said reading is tried with each encoding in fencs until one succeeds. Why not reload

Re: Copy and paste from status line

2020-12-10 Thread A. Wik
gt; On Wed, Dec 9, 2020 at 4:21 PM A. Wik wrote: >>> >>> Hi all, >>> >>> In gVim (at least my version, which uses GTK), you can select text in >>> the status line, but how can you copy it? Or maybe you can't? >>> >>> Cheers, >

Re: Changing encoding of an already loaded buffer

2020-12-10 Thread A. Wik
On Wed, 9 Dec 2020 at 20:20, Gabriele F wrote: > > On 09/12/2020 18.47, A. Wik wrote: > > I don't include utf8 in my default fencs setting because that has the > > side effect of using utf8 for any newly created files. > > Completely off-topic, if you don't have

Re: Changing encoding of an already loaded buffer

2020-12-09 Thread A. Wik
On Tue, 8 Dec 2020 at 16:47, Bram Moolenaar wrote: > > > Albert Wik wrote: > > > > Why does "set fencs=utf8" matter for the "%!cat" operation if Vim is > > not going to change the "fenc" accordingly? > > When reading a file

Copy and paste from status line

2020-12-09 Thread A. Wik
Hi all, In gVim (at least my version, which uses GTK), you can select text in the status line, but how can you copy it? Or maybe you can't? Cheers, Albert. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For mor

Re: Changing encoding of an already loaded buffer

2020-12-08 Thread A. Wik
On Tue, 8 Dec 2020 at 12:55, Bram Moolenaar wrote: > > > Albert Wik wrote: > > > > Right. The only way I've found is to use a temporary file. > > Incidentally, the zsh shell makes that easy: > > % gvim -f =(man llseek) > > Assuming that loading the

Re: Changing encoding of an already loaded buffer

2020-12-08 Thread A. Wik
On Mon, 7 Dec 2020 at 20:49, Gabriele F wrote: > > The actual "correct" way to "change" the encoding of a buffer is, I > believe, with the "++enc" option, added either to :e (e.g. `:e > ++enc=utf8`) or several similar commands such as indeed :vi (`:vi > ++enc=utf8`). Thanks, I didn't know about t

Re: Changing encoding of an already loaded buffer

2020-12-08 Thread A. Wik
Hi all, I tried a few things: (1) gvim -f ++enc=utf8 - result: "E492: Not an editor command: +enc=utf8 (2) gvim -f +enc=utf8 - result: see (1) (3) gvim -f +"set fenc=utf8" - result: no error message; sets fenc to "utf-8", but file is loaded as if with latin1. (4) gvim -f -c "set fenc=utf8" - resu

Changing encoding of an already loaded buffer

2020-12-07 Thread A. Wik
Hi all, I sometimes need to change the encoding used for a file. I have the default set to latin1 except for files with an ucs-bom. However, when I load a file encoded in UTF-8 or CP-437 the default is wrong. What I do then is normally to ":set fencs=utf8" and ":vi" to reload the file. However

Re: Matching words within X lines [PS]

2020-12-07 Thread A. Wik
On Mon, 7 Dec 2020 at 02:29, Tim Chase wrote: > > On 2020-12-06 20:23, Tim Chase wrote: > > They're ugly, but vim will at least let you do them. > > Oh, one other caveat: it only finds the bookends and starts the next > search after the closing bookend. So if there is the possiblity that > the m

Re: Documentation: braces or parentheses

2020-12-06 Thread A. Wik
On Sun, 6 Dec 2020 at 17:51, Bram Moolenaar wrote: > > Yes, it should be parentheses. But I only find one occurrence, are > there more? There are 2 occurrences of "brace" in my version of pattern.txt. The second is in the /\@= section. -aw -- -- You received this message from the "vim_use"

Matching words within X lines

2020-12-06 Thread A. Wik
Hi all, I'm trying to match a couple (maybe more later) of words occurring within 3 lines of each other in any order. Is there a way to do this with a Vim regex? -Albert. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are reply

Re: Documentation: braces or parentheses

2020-12-06 Thread A. Wik
On Sun, 6 Dec 2020 at 16:29, Jesus Arocho wrote: > > Not quite: > () = parenthesis or round brackets > {} = braces or curly brackets > [ ] = brackets or square brackets > Yes? Not quite what? What you write above just seems to illustrate what I was saying. I meant that "brackets", not "braces"

Documentation: braces or parentheses

2020-12-06 Thread A. Wik
Hi all, The documentation, specifically pattern.txt section /atom, refers to "braces" but apparently means "parentheses". Braces in my definition are particularly { and }. According to Wikipedia, the term "bracket" is used for brackets of any kind. https://en.wikipedia.org/wiki/Bracket Regards,

Re: .swp files

2020-11-05 Thread A. Wik
On Thu, 5 Nov 2020 at 13:17, Tony Mechelynck wrote: > > Yeah: Long before I knew about Vim, when doing translations on a PC-XT > using an editor much simpler than Vim (but anyway far less simple than > Notepad), I learnt to save my work ever quarter-hour and never to > stand up without first savin

Re: Backup files and long filenames

2020-09-17 Thread A. Wik
On Thu, 17 Sep 2020 at 13:35, 'Ottavio Caruso' via vim_use < vim_use@googlegroups.com> wrote: > On Thu, 17 Sep 2020 at 08:57, A. Wik wrote: > > > > Hi all, > > > > I've noticed that Vim does not, when running in plain DOS, find the > backup file

Backup files and long filenames

2020-09-17 Thread A. Wik
Hi all, I've noticed that Vim does not, when running in plain DOS, find the backup files it created with long filenames when running under Win98. Is there a solution? Regards, Albert. -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text

Re: Autocommand script

2020-08-22 Thread A. Wik
On Sat, 22 Aug 2020 at 14:55, Tom Ryder wrote: > > On Sat, Aug 22, 2020 at 09:01:56AM +0000, A. Wik wrote: > >if has("autocmd") > > au BufLeave * let x=0 | while x<=bufnr('$') | > >\ if bufexists(x) | > >\ set buflisted hidd

Autocommand script

2020-08-22 Thread A. Wik
Hi all, I was wondering (a) if there is a better way to do it than this script, and (b) whether all the backslashes and pipe characters (|) are really necessary and why. if has("autocmd") au BufLeave * let x=0 | while x<=bufnr('$') | \ if bufexists(x) | \ set buflisted hidden bufhidden=hi

Re: Using :g to filter lines through an external command

2020-07-13 Thread A. Wik
On Sun, 12 Jul 2020 at 19:12, Tim Chase wrote: > > On 2020-07-12 09:59, A. Wik wrote: > > Hi all, > > > > Assume I have a file (or just a buffer) with the contents: > > echo Hello from /bin/sh > > test1 > > test2 > > test3 > > ---end-file--- &

Using :g to filter lines through an external command

2020-07-12 Thread A. Wik
Hi all, Assume I have a file (or just a buffer) with the contents: echo Hello from /bin/sh test1 test2 test3 ---end-file--- :1!sh does what I would expect: it passes "echo Hello from /bin/sh" as input to the shell, which executes the line as a command, and the line is replaced with "echo"'s outpu

Re: how you usually quiting/closing vimdiff mode?

2010-04-25 Thread wik
Hello guys, thank you so much for the answers, here is quick combos I'm going to give a try next working days :) nnoremap gd :Gdiff " open vimdiff for current file and git head (fugitive extension) nnoremap gD :diffoff!h:bd " switch back to current file and closes fugitive buffer -- You receive

how you usually quiting/closing vimdiff mode?

2010-04-24 Thread wik
Hello, I am using vim with fugitive extension http://www.vim.org/scripts/script.php?script_id=2975 It has :Gdiff command which brings you into vimdiff mode, but what is the right/quick way to close/quit vimdiff mode? i.e. let's say I am editing file FooBar.txt under git repository, then firing u

Re: customize my initial window size

2009-11-15 Thread wik
`set lines=99 columns=100` works for me in gVim under Ubuntu Karmic. You might be also interested in this solution: http://vim.wikia.com/wiki/Restore_screen_size_and_position See Version 1. Thanks. On Nov 14, 6:24 am, Jason wrote: > I would like to set the initial window size and position of

Re: CSCOPE ERROR: E429: File "path/to/file.c" does not exist

2009-08-13 Thread wik
Hello, Could you send exact command you build cscope.files with? I think problem in related pathes... Possible solutions: 1. cwd current VIM directory to project directory, i.e. execute from the vim's command line ":cd /home/you/projects/project" and try again; 2. use full path when buildin