Re: What happened to "Search hit BOTTOM, continuing at TOP"?

2019-09-06 Thread ds
Hi!


Speaking of this " W' indicator, why was it chosen to _add_ it to the 
'[N/M]' string instead of _prepending_ "W " before one? 

The point is, if _appended_, then at the moment of wrapping, the expected 
position of '[N/M]' changes slightly to the left, which isn't exactly nice 
(like, why the information is jumping in front of our eyes, etc). While if 
_prepended_, the counter itself stays exactly where it was, and only this 
sign "W" appears on the left. Don't know if I'm right or wrong here but I 
personally certainly like the prepended option better.

If you agree, then here's a patch for src/search.c, which seems to fix it 
(I'm not a programmer, I also don't know ANYTHING about C at all, and these 
few lines here may be completely wrong and stupid, so, please, feel 
absolutely free to change it if needed):


5014c5014,5017
< STRCPY(t + len, " W");
---
> char t_tmp[len + 2];
> STRCPY(t_tmp, t);
> STRCPY(t + 0, "W ");
> STRCPY(t + 2, t_tmp);




-- 
ds




On Thursday, August 29, 2019 at 12:30:12 PM UTC+1, Christian Brabandt wrote:
>
>
> On Do, 29 Aug 2019, Marius Gedminas wrote: 
>
> > (I like the [N/M] index, but I also think the W is way too subtle, and I 
> > find myself looping again and again.) 
>
> When the N/M index was first introduced, it did show the error message 
> and forced a small delay to make sure it can be read before the N/M 
> index would potentially overwrite it. However people complained about 
> vim being unresponsive, so it was changed and the 'W' indicator was 
> added as a compromise. 
>
> Best, 
> Christian 
> -- 
> Jeder Tag an dem du nicht lächelst, ist ein verlorener Tag. 
> -- Charlie Chaplin 
>

-- 
-- 
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/d3b45657-181c-43cb-ae37-b2b300dcd01d%40googlegroups.com.


Re: Overwriting an autocmd for a particular filetype

2018-05-01 Thread ds
Christian, thanks for your reply!

What would you say about such a scheme:

First, I have this defined in my .vimrc:

```VIMRC```
augroup MyAutoCmd
autocmd!
autocmd MyORIGINALFancyAutoCmdHere
augroup END
```VIMRC END```

Second, these triggers are present in the filetype-specific settings

```after/ftplugin/somefiletype.vim```
function! NewCmdOn()
augroup MyAutoCmd
autocmd!
autocmd MyNEWFancyAutoCmdHere
augroup END
endfunction
autocmd! BufEnter,WinEnter,TabEnter  call NewCmdOn()

function! NewCmdOff()
augroup MyAutoComp
autocmd!
autocmd MyORIGINALFancyAutoCmdHere
augroup END
endfunction
autocmd! BufLeave,BufDelete  call NewCmdOff()
```after/ftplugin/somefiletype.vim END```

Now, upon entering the filetype-specific buffer, the original autocmd defined 
in .vimrc will be reset and overwritten with the new one. And if leaving this 
filetype-specific buffer, it will be reset again, and then overwritten with the 
original one. Am I right? BufLeave and BufDelete should cover all the cases, or 
should I consider adding WinLeave, TabLeave, etc, too?


Thanks!


-- 
ds

-- 
-- 
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.


Overwriting an autocmd for a particular filetype

2018-05-01 Thread ds
Hi!


Let's say I have an autocmd defined in my .vimrc, which applies to every 
possible buffer (autocmd-pattern is set to *). Now, is there any way to 
override this autocmd only for a particular filetype? I mean, to disable this 
"general" autocmd and to use another one instead? With the help of 
after/ftplugin, probably?

(Wrapping this autocmd in augroup, and then resetting it in 
after/ftplugin/myfiletype.vim with autocmd! overwrites it globally, of course. 
Is there a less destructive way? Would be grateful for a hint :)


Thanks.


-- 
ds

-- 
-- 
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: "zz" vs ":echo"

2018-04-10 Thread ds
Thanks a lot, Jason!

On Tuesday, April 10, 2018 at 4:05:55 PM UTC+1, Jason Felice wrote:
> zz centers the cursor in the window *vertically* by scrolling the window.  
> This is why the window is scrolling.  When the cursor is above the 1/2 the 
> screen height, zz doesn't scroll because there's no more file to display.  
> Once below that point, it will keep the cursor in the middle row.
> 
> 
> There is a note on :help :echom about redraws.  If you put a redraw before 
> the echom, the message does not disappear.  This is because echom writes the 
> output but it is immediately cleared by the screen redraw when the normal 
> commands cause the screen to scroll.

-- 
-- 
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.


"zz" vs ":echo"

2018-04-10 Thread ds
Hi!

I noticed quite a strange situation when centering text somehow suppresses the 
echo output. 

Since it all sounds rather weird, I created a reproducible example here: 
https://pastebin.com/F08V77Av – you can download the file, open it with vim -u 
NONE, source it then, go to line number 13, and start pressing the j key, – and 
as soon as you'll reach the middle of your screen, and the text will actually 
start scrolling, the echom output will be suppressed.

Why is that? And is there any workaround?

Thanks!

-- 
-- 
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: Help needed on terminal mappings

2017-11-10 Thread ds
Speaking of ... My terminal (iTerm.app on macOS) sure does 
distinguish  from  (cat reports ^[[1;9D for the former, and ^[[D 
for the latter), my Vim does understand those keys, too, and I have the 
following in my $VIMRC (which works perfectly):

```
" go to the previous word
nnoremap [1;9D 
inoremap [1;9D 
xnoremap [1;9D 
cnoremap [1;9D 
" go to the next word
nnoremap [1;9C 
inoremap [1;9C 
xnoremap [1;9C 
cnoremap [1;9C 
```

But unfortunately :terminal fails to separate those, and cat reports ^[[D for 
both  and .

Having that in mind, the solution you provided allows to map  or 
 but not . What do you think, is there any way to fix that?


Thanks,


-- 
ds

-- 
-- 
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: help a beginner getting vim setup with YCM and Jedi

2016-01-07 Thread Johan DS
take a look at http://vim.spf13.com/
it installs a vimrc and some plugins with vundle
you then can take a look how things work

On Thu, Jan 7, 2016 at 5:40 PM, Never Boy  wrote:

> Dear Vim users
> I have started using vim lately and really enjoyed the learning. But after
> a while I simply got stuck.
>
> Vim is not hard to learn to use I dont think but building it into a work
> environment is really hard!
>
> Installing plugins and making them work is hard. Especially jedi and
> YouCompleteMe.
>
> I have tryed for a week now and even totally given up a couple of times
> and just reverted back to notepad ++... But...
>
> I want it to work!
>
> I have used vundle to install the plugins and they appear in my bundle
> folder. But nothing happens when i type in vim - no autocompletion or
> suggestions.
>
> I am sure it is something very elementary I'm doing wrong... but I simply
> cannot figure this out...
>
> Can anyone here help me get this up and running. If I manage to get it
> working I am gonna make a video tutorial about it!
>
> here is my vimrc. file:
>  1 set nocompatible  " be iMproved, required
>   2 filetype off  " required
>   3
>   4 " set the runtime path to include Vundle and initialize
>   5 set rtp+=~/.vim/bundle/Vundle.vim
>   6 call vundle#begin()
>   7 " alternatively, pass a path where Vundle should install plugins
>   8 "call vundle#begin('~/some/path/here')
>   9
>  10 " let Vundle manage Vundle, required
>  11 Plugin 'VundleVim/Vundle.vim'
>  12 Plugin 'Valloric/YouCompleteMe'
>  13 " jedi plugin for autocomplete python
>  14 Plugin 'davidhalter/jedi-vim'
>  15
>  16 " " this may be needed for the completers...
>  17 Plugin 'Rip-Rip/clang_complete'
>  18 "
>  19 " enable syntax highlighting
>  20 syntax enable
>  21
>  22 " Text after double qoutes is a comment
>  23 set ruler
>  24
>  25 " show line numbers
>  26 set number
>  27
>  28 " set tabs to have 4 spaces
>  29 set ts=4
>  30
>  31 " indent when moving to the next line while writing code
>  32 set autoindent
>  33
>  34 " show a visual line under the cursor's current line
>  35 set cursorline
>  36
>  37 " show the matching part of the pair for [] {} and ()
>  38 set showmatch
>  39
>  40 " enable all Python syntax highlighting features
>  41 let python_highlight_all = 1
>  42
>  43 " expand tabs into spaces
>  44 set expandtab
>  45
>  46 " sets autoindent to 4
>  47 set shiftwidth=4
>  48
>  49 " syntax for python
>  50 syntax on
>  51
>  52 set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{}]\
>  53 \ [%l/%L\ (%p%%)
>  54 filetype plugin indent on
>  55 au FileType py set autoindent
>  56 au FileType py set smartindent
>  57 au FileType py set textwidth=79 " PEP-8 Friendly
>
> --
> --
> 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.
>

-- 
-- 
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: vim vs. ebooks

2011-12-19 Thread ds
On Sunday, December 18, 2011 2:40:10 PM UTC+2, MarcWeber wrote:

 Think about the *why* you're asking for Vim - and then write again. We may 
 find other workarounds for you.


because I'm a bit tired reading w/ 'less'.

on a more serious note I may only say that since vim has incredible 
opportunities for manipulating text it seems only logical for me to 
reformat ebooks w/ vim for easier reading (i.e., make shorter lines, 
highlight bold text, quotes, etc, etc). and if already using vim for 
preparing text, I see absolutely no reason to go for another tool for 
reading (I personally have vim running all the time in screen, and 
definitely has more than one buffer open -- so why not to dedicate one for 
a book?).


-- 
ds

-- 
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


vim vs. ebooks

2011-12-18 Thread ds
hello,


has anybody seen any good and / or interesting workaround for reading 
ebooks (HTML, EPUB, FB2, [RTF]) in vim?


best,


-- 
ds

-- 
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