Re: Vim in Windows Command Prompt only has 16 colors to work with

2024-06-01 Thread Maxim Kim
I had for a long time if has("win32") && !has("gui_running") set t_Co=256 endif in my configuration to make it 256 colors aware. On Saturday, May 25, 2024 at 6:19:05 AM UTC+10 DwigtArmyOfChampions wrote: > If I launch vim from the Windows 10 cmd line and then run the command > "echo _Co"

Re: "iabbrev" erratic behaviour

2024-02-19 Thread Maxim Kim
> Is there a way to troubleshoot that? You can check if it works without your configuration: $ vim -Nu NONE : iabbrev mdate =strftime("%a %d/%m/%Y") If it isthere must be something in vim config you will need to figure out. One common approach is to bisect your vimrc. On Monday, February

Re: Visually selecting multi-lines inside backticks

2024-02-11 Thread Maxim Kim
Because then there would be things like this: [image: Screenshot 2024-02-12 132702.png] On Saturday, February 3, 2024 at 3:50:49 AM UTC+11 Manas wrote: > Hi, this is quite a stupid question but why doesn't backticks work for > multi-line selection via something like vi` > > I have some blocks

Re: popup window filter, what is <80>` ?

2022-08-07 Thread Maxim Kim
in gvim I get it into a filter func... воскресенье, 7 августа 2022 г. в 18:55:46 UTC+3, Maxim Kim: > The issue is with windows gvim 9.0.133 > I have tried the same in fedora36 vim 9.0.161 and it doesn't have this. > > воскресенье, 7 августа 2022 г. в 18:49:03 UTC+3, Maxim Kim: > >>

Re: popup window filter, what is <80>` ?

2022-08-07 Thread Maxim Kim
The issue is with windows gvim 9.0.133 I have tried the same in fedora36 vim 9.0.161 and it doesn't have this. воскресенье, 7 августа 2022 г. в 18:49:03 UTC+3, Maxim Kim: > > It looks like it happens on cursorhold event, not 100% sure though. > > Indeed, if I change `set upd

Re: popup window filter, what is <80>` ?

2022-08-07 Thread Maxim Kim
It looks like it happens on cursorhold event, not 100% sure though. Indeed, if I change `set updatetime=1000` then I get this every second: vim9script def Test()     var prompt: string = ''     const wid: number = popup_create('', {     minwidth: 20,     maxheight: 1,    

Re: popup window filter, what is <80>` ?

2022-08-07 Thread Maxim Kim
On 2022-08-07 17:53, Bram Moolenaar wrote: Don't see it in the GIF. in the message area at the end of gif <80>` here probably is a third byte that you don't see. Third byte is ` 0x80 0xfd is a prefix for a special key. There is a list in src/keymap.h, "enum key_extra". I have

popup window filter, what is <80>` ?

2022-08-07 Thread Maxim Kim
Hi, currently there is no built-in way to have a prompt in a popup window so am trying to fake it with filtering. While in the early stages, I found out that the filter func constantly gets <80>` value. What is this? How can I properly filter it out? With the following code: vim9script

Re: Terminal window colors

2022-08-04 Thread Maxim Kim
Fixed colorschemes are now included into vim. понедельник, 1 августа 2022 г. в 18:50:31 UTC+7, antone...@gmail.com: > Em dom., 31 de jul. de 2022 09:30, Maxim Kim escreveu: > >> This is a bug in remade colorschemes. >> >> We have fixed it and will provide updated col

Re: Import vim9 script as that and map that.func fails

2022-08-04 Thread Maxim Kim
kn8DMnYrRymE9/view?usp=sharing > > Le jeudi 4 août 2022 à 06:52:50 UTC+2, Maxim Kim a écrit : > >> *> nnoremap n n*that.HLNext(80) >> >> remove to see messages, also `:` is not needed. >> >> Also in the gif you are importing with the full path, not sur

Re: strange difference in UI for identical .vimrc

2022-08-03 Thread Maxim Kim
Colorschemes were changed, now all of them define Normal highlight. To make it transparent, you can follow :h :colorscheme (several paragraphs down): If a color scheme is almost right, you can add modifications on top of it by using the |ColorScheme| autocommand. For example, to remove the

Re: Import vim9 script as that and map that.func fails

2022-08-03 Thread Maxim Kim
*> nnoremap n n*that.HLNext(80) remove to see messages, also `:` is not needed. Also in the gif you are importing with the full path, not sure if it matters. среда, 3 августа 2022 г. в 20:31:47 UTC+7, niva...@gmail.com: > Thank you Bram, > >- I added as described. >- Can you just

Re: Terminal window colors

2022-07-31 Thread Maxim Kim
https://github.com/vim/vim/pull/10828 воскресенье, 31 июля 2022 г. в 19:29:57 UTC+7, Maxim Kim: > This is a bug in remade colorschemes. > > We have fixed it and will provide updated colorschemes to vim in some near > future. > > https://github.com/vim/colorschemes/issues/1

Re: Terminal window colors

2022-07-31 Thread Maxim Kim
This is a bug in remade colorschemes. We have fixed it and will provide updated colorschemes to vim in some near future. https://github.com/vim/colorschemes/issues/198 суббота, 30 июля 2022 г. в 23:33:31 UTC+3, matthew...@gmail.com: > > сб, 30 июл. 2022 г. в 22:18, Alessandro Antonello : >

vim9 file manager/dir explorer

2022-07-27 Thread Maxim Kim
Hi, for those of you who already have vim9, could you test "a new plugin" that serves a role of simple file manager / dir explorer? https://github.com/habamax/vim-dir Thank you! -- -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you

Re: [VIM] Re: [VIM] Re: [VIM] Re: vim/colorschemes: Request For Comments

2022-02-15 Thread Maxim Kim
вторник, 15 февраля 2022 г. в 13:44:16 UTC+3, Walter Cazzola: > As replied to Romain, also the manual installation fails. > The directory structure I see is not what `:h packages` would suggest to have. In the end it should have smth like: /home/username/.vim/pack/bundle/start └──

Re: [VIM] Re: [VIM] Re: vim/colorschemes: Request For Comments

2022-02-14 Thread Maxim Kim
Hi Walter, looks like your vim/colorscheme installation is not "correct". Your `:verbose hi Normal` command shows that original murphy was used, not the one from vim/colorschemes. I can't tell anything about vundle as I don't use it, but the simplest way to install a "plugin" from github is to

vim9script process a range with a function

2022-01-11 Thread Maxim Kim
How in vim9script a range should be processed by a def function? Vim9.txt states that def functions do not support range option. So given a range what def function would/should do? Run it for every line in range? How do I get smth similar to a:firstline and a:lastline? -- -- You received

Re: syntax include and spellcheck

2011-05-22 Thread Maxim Kim
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

syntax include and spellcheck

2011-05-21 Thread Maxim Kim
Hi, Is there any way I can have spellcheck and 'syntax include' in one buffer? If I open new buffer and enter there: Hello wld then after :setlocal spell spelllang=en I have 'wld' highlighted as spellbad. Now if I execute :syntax include @testgroup syntax/python.vim spellchecker stops

Re: How Could I modify the Vim Script Type

2010-12-23 Thread Maxim Kim
On Thursday, December 23, 2010 10:33:56 PM UTC+3, Bram Moolenaar wrote: Shawjia wrote: I just upload a new Vim Scipt to vim.org. ( http://www.vim.org/scripts/script.php?script_id=3376) For some reasons, I forget to select the right Script Type. Now the type of this script is syntax, I

Re: Change plugin owner on vim online?

2010-12-15 Thread Maxim Kim
On Wednesday, December 15, 2010 10:32:06 AM UTC+3, H wrote: Hi, Is it possible to change plugin owner on vim online? Thanks. I don't think so. I would love to change type of my plugin from ftplugin to utility myself but there is no way to do. Unless you ask Bram I believe. -- You

Getting background color of Normal highlight group.

2010-10-05 Thread Maxim Kim
Hi, Could anyone point me if there is a way I can find out background color of Normal highlight group? I need it in form of #RRGGBB. What I have at the moment: redir = hlstatus silent hi Normal redir END echo matchstr(hlstatus, 'guibg\s*=\s*\zs\S\+') It * prints empty string on

Re: How could I show the line by indent as in notepad++?

2010-07-31 Thread Maxim Kim
'colorcolumn' option depends on the value of textwidth, and can only highlight one column. Is there any other method? Thank you. try :set colorcolumn=4,8,12,16 -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For

Re: Request for Win Gvim to match *nix re: .vimrc/.gvimrc/.vim

2010-07-23 Thread Maxim Kim
On 23 июл, 05:49, Linda W v...@tlinx.org wrote: I'd like to try to reuse my files as much as possible w/o modications, so when files go missing or I need to reinstall in a new dir or such, I can just tar or zip up one dir or just use 'cp -a' from the linux dir to the windows dir. Gvim

Re: Right margin highlighting not working when opening more windows.

2010-07-23 Thread Maxim Kim
On 23 июл, 13:30, Frans Grotepass fmgrotep...@yahoo.co.uk wrote: On Friday 23 July 2010 10:23:55 Frans Grotepass wrote: Hi all, I enabled right margin highlighting using    :match rightMargin /.\%100v/    :highlight rightMargin guifg=black    :highlight rightMargin guibg=pink When I

Re: scratch buffer on start up

2010-05-06 Thread Maxim Kim
On 6 май, 13:15, john Maclean jaye...@gmail.com wrote: Chaps, Check this out - going from emacs to vim, (again) as emacs' keybindings are a pain on a mac book pro. There must be a way to have vim create a scratch buffer on start up. The following line in your vimrc might help: au VimEnter

Re: au BufReadPost * if readonly | set nomodifiable

2010-05-05 Thread Maxim Kim
On 5 май, 08:43, rudy_b rudyke...@yahoo.com wrote: Hi, I have included the autocmd (listed below) in my .vimrc file.  au BufReadPost * if readonly | set nomodifiable The intention is to not let gvim even modify the read only files, which works great with some downside. It only works when

Re: au BufReadPost * if readonly | set nomodifiable

2010-05-05 Thread Maxim Kim
On 5 май, 19:54, rudy_b rudyke...@yahoo.com wrote: hi, how did you open your second file? Cause it doesn't work for me. I am using either :vsplit or :sp   and non works I did it with :e command. I have also tried :sp -- it works just fine. Could you show us your .vimrc? -- You received

Re: menu for buffers of specific filetype

2010-04-04 Thread Maxim Kim
On 5 апр, 08:44, Tony Mechelynck antoine.mechely...@gmail.com wrote: I'm surprised that there was no answer to this post in almost two months. Yes, in Vim the only way to detect that a buffer has been entered or left is by means of autocommands. Since you want to take some action (modify

Width of the visual selection

2010-03-26 Thread Maxim Kim
Hi! Is there a way one can get visual selection width without corrupting registers? Say I have 'dummy text' visually selected. Using registers I can find the length by using: y echo len(getreg('')) I thought strpart with col('`') and col('`') would work but it doesn't as col('`') returns 0.

Re: Width of the visual selection

2010-03-26 Thread Maxim Kim
On 26 мар, 15:28, Jürgen Krämer jottka...@googlemail.com wrote: High Maxim Kim wrote: Is there a way one can get visual selection width without corrupting registers? Say I have 'dummy text' visually selected. Using registers I can find the length by using: y echo len(getreg

Re: motion end of line excluding space

2010-03-11 Thread Maxim Kim
On 11 мар, 15:32, sinbad sinbad.sin...@gmail.com wrote: hi, how to move to end of line ignoring end of line spaces. meaning i have to move to first space of end of line. Try :help g_ -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you

Re: Generate Header

2010-02-21 Thread Maxim Kim
On 21 фев, 14:20, epanda callingel...@hotmail.fr wrote: Hi, I would like to generate my header ; func! GenereHeader()         let l:header = \** . \n         let l:header .= \\\* ... . \n         let l:header .= \\\* @author ONEPERSON . \n         let l:header .= \\\* . \n         call

Re: Advanced vim auto-completion

2010-02-11 Thread Maxim Kim
On 11 фев, 11:30, Aman Jain amanjain.nit...@gmail.com wrote: Hi I am trying to build a lexical analyzer using flex. Following is a line which shows a regular expression and its corresponding action. [0-9] {printf(yada yada \n);} //regex1 Is there a way to reuse {printf(yada yada \n);} from

menu for buffers of specific filetype

2010-02-09 Thread Maxim Kim
Hi, What is the vim way to define filetype(or buffer) specific menus? I want a menu to be available only in buffers of my filetype. For mappings I usually use buffer but couldn't find it for :menu command. There is 'disable' exists though. But as far as I can see it needs autocommands to set

Re: Python indention

2010-01-28 Thread Maxim Kim
On 28 янв, 14:16, Torsten Andre q...@takb.net wrote: Hi everyone, I am having some trouble with my indention in python. I installed the indention plugin for Python under [1] and according to the documentation, I think comments starting with a # should not moved to the very left of the page,

Re: FIXME syntax highlighting.

2010-01-26 Thread Maxim Kim
On 26 янв, 18:35, Stroller strol...@stellar.eclipse.co.uk wrote: Hi there, The documentation [1] shows that syn clear perlTodo will clear this   highlighting for the current programming language, and presumably I   can put it in my .vimrc and never be bothered again when writing Perl. Is

Re: Plugin to manage buffers and tabs

2010-01-22 Thread Maxim Kim
On 22 янв, 02:55, Andy Wokula anw...@yahoo.de wrote: Am 21.01.2010 19:47, schrieb Foss User: It's all builtin: :set swb=usetab :tab sb {part-of-bufname} You can omit :tab here :sb {part-of-bufname} -- You received this message from the vim_use maillist. For more information, visit

Re: Plugin to manage buffers and tabs

2010-01-22 Thread Maxim Kim
On 22 янв, 13:27, Andy Wokula anw...@yahoo.de wrote: Am 22.01.2010 09:05, schrieb Maxim Kim: On 22 янв, 02:55, Andy Wokulaanw...@yahoo.de  wrote: Am 21.01.2010 19:47, schrieb Foss User: It's all builtin: :set swb=usetab :tab sb {part-of-bufname} You can omit :tab here :sb

Re: Vim plugin to maintain journal?

2010-01-22 Thread Maxim Kim
On 22 янв, 16:27, Gary Bickford gar37...@gmail.com wrote:  AFAI can tell the VIM wiki plugin doesn't have folding support however. As far as I know vimwiki has folding support. But it is quite slow especially for a huge files. For smaller ones it is more than useable though. -- You received

Re: Plugin to manage buffers and tabs

2010-01-22 Thread Maxim Kim
On 22 янв, 18:24, Ben Fritz fritzophre...@gmail.com wrote: On Jan 21, 5:55 pm, Andy Wokula anw...@yahoo.de wrote: It's all builtin: :set swb=usetab :tab sb {part-of-bufname} or just: :set swb=usetab,newtab :sb {part-of-bufname} Doesn't work for me when when a yet invisible buffer

Re: Custom Paragraph Formatting with gq

2009-12-01 Thread Maxim Kim
On 1 дек, 09:05, Robert Chan vibrant.softw...@gmail.com wrote: I have logbook entries that have the following structure: Any ideas? (I've been reading 'formatoptions' and fo-table but could not find anything of related to custom paragraph settings.) Thanks. Last time I tried to do almost

Re: Custom Paragraph Formatting with gq

2009-12-01 Thread Maxim Kim
On 1 дек, 17:54, Andy Wokula anw...@yahoo.de wrote: Andy Wokula schrieb: Robert Chan schrieb: I have logbook entries that have the following structure: If it wasn't so d*** unusable, I would recommend 'formatexpr':     :h 'fex Having sent that, I immediately regretted it. In this

Re: About showbreak

2009-11-13 Thread Maxim Kim
On 13 ноя, 17:17, Andreas Kreienbuehl k7...@unb.ca wrote: Hi there For my vimrc, what would be the proper syntax for if 'beginning of line = n tabs (n an integer greater or equal to one)'      do 'set showbreak = n tabs worth of white space' endif I believe there is a patch that does what

Re: About showbreak

2009-11-13 Thread Maxim Kim
On 13 ноя, 17:53, Maxim Kim haba...@gmail.com wrote: On 13 ноя, 17:17, Andreas Kreienbuehl k7...@unb.ca wrote: Hi there By the way, what language is the vimrc written in? Is it C? I'm pretty new to this but want to understand it better. It is vimscript. Type :h eval in vim to get some

Re: selectively disable filetype indent

2009-11-09 Thread Maxim Kim
On 9 ноя, 10:54, Rene de Zwart renew...@xs4all.nl wrote: I wrote a plugin for assisting in (x)(ht)(x)ml editing. However when    filetype indent on is specified it messes up some actions in my plugin e.g. \t\thtml becomes html \t\t| /html AND I Expect it to become \t\thtml \t\t\t

Re: check if inoremap is set

2009-10-13 Thread Maxim Kim
On 13 окт, 11:27, Keyan key@googlemail.com wrote: hi, can i somehow ask if there was one set, or is there a better way to solve the problem? Add the following line inoremap buffer { { }ESCO into the files(create if needed): .vim/after/ftplugin/perl.vim

Re: Possible bug with autochdir

2009-10-04 Thread Maxim Kim
On 3 окт, 23:51, Mikalai Chaly nch...@gmail.com wrote: The issue reason is command order. When you do set autochdir, vim changes current dir and sets up current buffer to use file myfile instead of test\myfile. Then set encoding brings up multibyte initialization, which re-writes

Possible bug with autochdir

2009-10-03 Thread Maxim Kim
Hi, Could anyone verify the next behaviour: 1. _vimrc should only have: set nocp set autochdir set encoding=utf-8 2. in the shell do: mkdir test echo hello world test\myfile vim test\myfile My vim do not open test\myfile it just says:

Re: Windows console: unable to read/write russian text

2009-09-29 Thread Maxim Kim
On 29 сен, 09:36, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 29/09/09 06:37, Maxim Kim wrote: [...] IIUC, the Vim default for 'termencoding' is the empty string. Maybe that option is set elsewhere, maybe in the UTF-8-setting script that I published at vim-online, or maybe

Re: Windows console: unable to read/write russian text

2009-09-29 Thread Maxim Kim
On 29 сен, 10:57, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 29/09/09 08:11, Maxim Kim wrote: PS This is quite strange. If I (using my _vimrc with set enc=utf-8) 1. Change font to Lucida Console. 2. Write some text -- everything is ok. I can see correct russian

Windows console: unable to read/write russian text

2009-09-28 Thread Maxim Kim
Hi, Can you tell me how can I setup my vim to handle russian (utf-8) text in win console? Simple russian phrase Привет, меня зовут Максим. is unreadable. Though I can copy and it paste here. My settings are: :set enc? tenc? encoding=utf-8 termencoding=cp866 I thought it might be font issue,

Re: Windows console: unable to read/write russian text

2009-09-28 Thread Maxim Kim
On 29 сен, 02:15, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 28/09/09 22:06, Maxim Kim wrote: My settings are: :set enc? tenc? encoding=utf-8 termencoding=cp866 I'm not sure. - IIUC, typing echo Здравствуйте мир! echo Здравствуй мир! sounds better

Re: f{char} over multiple lines

2009-09-24 Thread Maxim Kim
On 24 сен, 11:57, Nathan Huesken v...@lonely-star.org wrote: Hi, Can the command f{char} (jump to the next occurence of {char} in the current line) be extended to work with multiple lines? I'd say no, but not sure. Why not /{char}CR instead?

Re: How to save/restore buffer lists between vim sessions?

2009-09-23 Thread Maxim Kim
Hi, On 23 сен, 10:20, pansz panshi...@routon.com wrote: In vim we can use :ls to list all buffers. You open 3 files, it all show in buffers. When you exit, and start vim without command-line arguments, the buffers are still there, use :ls list all buffers. I have no buffers. When you

Your own text objects: extending selection

2009-08-18 Thread Maxim Kim
Hi, I want 'header' text object (select with 'vah') to be extendable by further `ah` presses like ordinary `vaw`, `aw` works. So this is example data: = Header 1 = asdflkja asdlfkj asldfkj lkasdjf == Header 2 == asdfsad asdfasdf sdfasdfas asdfa = Header 1 = asdfasdfk This is my attempt:

Re: Using a variable as a command's 'count' argument

2009-07-29 Thread Maxim Kim
On 29 июл, 09:02, Daniel Tripp qpmirruvnnvwoca...@dt.theorem.ca wrote: Hello all.  I have a situation that I can't figure out. Say that I have set a variable like this: :let desiredcolumn=42 ... But instead of a constant like 42, I want to take the value from my 'desiredcolumn' variable.

Re: testing for an empty file

2009-07-27 Thread Maxim Kim
On 27 июл, 23:07, at atorgovit...@gmail.com wrote: I'm using a very nice template plugin called tSkeleton. Right now I'm operating it using an autocmd in my .vimrc:     autocmd BufNewFile *.f90      TSkeletonSetup fortran.f90 This works great when I start a new buffer from within .vim.

Re: Some o command that breaks the line at the cursor?

2009-05-19 Thread Maxim Kim
Hi Raúl On 19 май, 13:35, Raúl Núñez de Arenas Coronado raul...@gmail.com wrote: Hi all :) Moreover, in my map I want to do something like this (which doesn't work): nnoremap bufferLeadero :while getline(.)[col(.) - 1] == ''\|normal l\|endwhileCR It doesn't work for me either. I suppose

Re: Remapping the Enter key

2009-05-19 Thread Maxim Kim
On 20 май, 08:36, Matt Wozniski m...@drexel.edu wrote: 2009/5/19 Raúl Núñez de Arenas Coronado: Don't know if you've thought about it, but an expr map might be suitable... nnoremap expr Enter SuperEnter() inoremap expr Enter SuperEnter() function! SuperEnter()   if match(getline('.'),

Re: dw command not work propely with russian words

2009-05-18 Thread Maxim Kim
On 18 май, 22:06, crm79 chechul...@gmail.com wrote: if i type in vim слово, then after first using 'dw' -command deletes only char с (result is лово), after second use 'dw'-command result is ово. This is a bug? I suppose you use encoding other than utf8. What is the output of :set encoding ?

Re: can vim do this simple syntax translate

2009-04-19 Thread Maxim Kim
On 20 апр, 08:27, Sean guo.xiaoy...@gmail.com wrote: For example, I have a text file in which there are a lot of expressions in the following form:        id = number id: [a-z]+ number: [0-9]+ I want to rewrite these expressions into this form           (set id number) is it possible

Re: How do I shift a line by char characters instead of a tab?

2009-04-16 Thread Maxim Kim
On 16 апр, 17:35, Thierry lamthie...@gmail.com wrote: If I want to shift a few lines 3 chars to the right, I use the following command: set sw=3 // select the number of lines I want to shift from where my cursor is // However, the above shifts my lines by a tab character of size 3.  How

Re: Search a pattern contained in a register

2009-04-15 Thread Maxim Kim
On 15 апр, 10:27, Aman Jain amanjain.nit...@gmail.com wrote: How can I search for the text contained in a register(after yanking). e.g. if I did a ' ayw ' (copy a word to register a) on an identifier, but after some time navigate away , and then need to search for the same, then how do I

Re: Keymap and q-macro

2009-04-13 Thread Maxim Kim
On 13 апр, 11:16, Tony Mechelynck antoine.mechely...@gmail.com wrote: What is in register q? (:reg q without the quotes will tell you). If it's aGhbdtn? Vbh! (without the quotes) then the language-mapping wasn't applied to the recorded keystrokes, but only to what got written into the buffer.

Re: Move to a pattern without destroying the last search pattern?

2009-04-12 Thread Maxim Kim
On 12 апр, 14:25, Dennis Benzinger dennis.benzin...@gmx.net wrote: Hi! Sometimes I want to move to a pattern without actually searching for it. That is I don't want to destroy the last search pattern and I don't want to change the hlsearch highlighting. Is there a command for this? If

Keymap and q-macro

2009-04-12 Thread Maxim Kim
Hi I have just found that I can not use russian text in a q-macro using russian keymap. In normal mode: qqaПривет, Мир!q Then @q and result is: Ghbdtn? Vbh! I tried it at vanilla vim 7.2 and vim 7.2 1-148. --~--~-~--~~~---~--~~ You received this message from the

Check if highlight exists and not cleared.

2009-04-09 Thread Maxim Kim
Hi How can I check if highlight exists (was defined by a colorscheme)? For example if I define a group: :hi HelloWorld guifg=green I can check its existance with :echo hlexists(HelloWorld) And if I change colorscheme :colo desert highlight still exists but has clear status. So, is there a way

Re: Check if highlight exists and not cleared.

2009-04-09 Thread Maxim Kim
On 9 апр, 11:46, Tony Mechelynck antoine.mechely...@gmail.com wrote: func HlExists(hl)       untested         if !hlexists(a:hl)                 return 0         endif         redir = hlstatus         exe silent hi a:hl         redir END         return (hlstatus !~ cleared) endfunc

Decimal to hexadecimal

2009-04-08 Thread Maxim Kim
Hi, Can I convert decimal number to a hexadecimal in vimscript? --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: Decimal to hexadecimal

2009-04-08 Thread Maxim Kim
On 8 апр, 13:11, Teemu Likonen tliko...@iki.fi wrote: On 2009-04-08 01:48 (-0700), Maxim Kim wrote: Can I convert decimal number to a hexadecimal in vimscript? Yes, for example:     printf('%x', 1234)     printf('%X', 1234)     printf('%04x', 1234) Thanks

Re: to prevent comment startting from new line

2009-04-06 Thread Maxim Kim
On 6 апр, 10:20, Visco Shaun visc...@gmail.com wrote: While programming in python whenever i type '#' to start commenting it goes to the start of the line rather than at the indented position where i like it to be added. Is there any command to prevent this behaviour without changing any

netrw colors

2009-04-03 Thread Maxim Kim
Hi, In my colorscheme I want to redefine some netrw colors: hi link netrwData Operator hi link netrwLib Operator hi link netrwMakeFile Operator hi link netrwClassify Constant hi link netrwHidePat Constant hi link netrwList Constant But it doesn't work. It looks like netrw syntax file uses

Re: netrw colors

2009-04-03 Thread Maxim Kim
On 3 апр, 11:13, François Ingelrest francois.ingelr...@gmail.com wrote: On Fri, Apr 3, 2009 at 09:00, Maxim Kim haba...@gmail.com wrote: Have you tried using '!' ? I.e., hi! link netrwData Operator Yes I have. No effect. As expected. I raised the 'default' issue once, and Charles did change

Re: Replacing a character in a string

2009-04-02 Thread Maxim Kim
On 2 апр, 19:34, Spiros Bousbouras spi...@gmail.com wrote: let s = 'qwerty' Let's say I want to replace the first character by Q. I thought the following would work let s[0] = 'Q'   but it gives E689: Can only index a List or Dictionary So what is the simplest way to achieve such a task ?

Re: local options in autocmds apply settings to wrong buffer

2009-04-02 Thread Maxim Kim
a reload of test.txt. Vim is still in the test.c tab, so when the BufRead autocmd fires, 'wrap' is set for test.c instead of test.txt. I confirm it. Looks like a bug to me. Regards, Maxim Kim. --~--~-~--~~~---~--~~ You received this message from the vim_use maillist

Re: NERD_tree color scheme

2009-03-28 Thread Maxim Kim
to change Directory group settings: :hi Directory guifg=red guibg=green Regards Maxim Kim --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: How to split multiple CSS rules into one line each?

2009-03-26 Thread Maxim Kim
for me with: a.anything { color:#eee; display:block; width:300px; } a.anything { color:#eee; display:block; width:300px; } Result: a.anything { color:#eee; display:block; width:300px; } a.anything { color:#eee; display:block; width:300px; } Regards, Maxim Kim

Re: How to split multiple CSS rules into one line each?

2009-03-26 Thread Maxim Kim
On 26 мар, 09:56, Maxim Kim haba...@gmail.com wrote: Try g/[;}]\s*$/-1j It works for me with: a.anything { color:#eee; display:block; width:300px;} a.anything { color:#eee; display:block; width:300px; } Result: a.anything { color:#eee; display:block; width:300px

Re: use vim's command mode when typing commands?

2009-03-26 Thread Maxim Kim
On 26 мар, 12:55, fka...@googlemail.com fka...@googlemail.com wrote: Hi all, probably I do not express myself correctly in the subject, and as you might see, it's almost impossible to find something reasonable in the internet with these keywords ... ;-) When I type in comands like :help

Re: Can I run vimscript in arbitrary buffer?

2009-03-21 Thread Maxim Kim
On 21 мар, 20:08, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 18/03/09 10:26, Maxim Kim wrote: See :help E10 and check your backslashes. Also, what does         :verbose set cp? (with the question mark) tell you? nocompatible Last set from ~\_vimrc Anyway, the safest way

Can I run vimscript in arbitrary buffer?

2009-03-18 Thread Maxim Kim
Hi, What is if it exist the right way to run vimscript from a buffer without saving it first? I know about :@ but it can't process vimscript's longlines. If I copy the following lines into unnamed register: map F4 m`:silent! %s/\(\s\+$\)\\|\(\r$\)//gCR`` \:echo Remove trailing spaces and

Is it a good practice to setlocal bomb in ftplugin?

2009-03-16 Thread Maxim Kim
Hi, I have a (ft)plugin that overrides filetype of .wiki extension from flexwiki to vimwiki. Everything seems quite good except for a state of just opened buffer that is in 'changed' one. As far as I can see FlexWiki ftplugin does :setlocal bomb command that puts vim's buffer in a 'changed'

Re: Is it a good practice to setlocal bomb in ftplugin?

2009-03-16 Thread Maxim Kim
On 16 мар, 16:20, Tony Mechelynck antoine.mechely...@gmail.com wrote: ... Note that altering any of these three options in an undo_ftplugin line is courting disaster: Vim has a separate mechanism to detect these options' values when opening an existing file, and the results are usually

Re: Folding should not display the first line and ... should be appended in the last unfolded line

2009-03-16 Thread Maxim Kim
On 16 мар, 22:57, Ben Fritz fritzophre...@gmail.com wrote: On Mar 16, 12:00 pm, Maxim Kim haba...@gmail.com wrote: On 16 мар, 19:12, Ben Fritz fritzophre...@gmail.com wrote: Unix-like systems have a patch utility that does the opposite of diff so that you can take the difference between

Re: Bug with Title highliting

2009-03-14 Thread Maxim Kim
On 14 мар, 02:27, Maxim Kim haba...@gmail.com wrote: Now I can see that letter. I do not know what happend but I did those steps 3 times before post here and the letter was invisible. Weird. The problem is in Dejavu Sans Mono font. With font size 12 bold russian letter 'У' is invisible

Bug with Title highliting

2009-03-13 Thread Maxim Kim
Hi, Could someone confirm the following bug -- if some russian text highlighted as Title then letter У is invisible. Hitting ga shows me У 1059, Hex 0423, Octal 2043 Steps to reproduce: Open Vim. :syntax match testTitle /^.*$/ :hi def link testTitle Title Enter the next text: Уже угроза

Re: Bug with Title highliting

2009-03-13 Thread Maxim Kim
On 14 мар, 02:15, Maxim Kim haba...@gmail.com wrote: Hi, Steps to reproduce: Open Vim. :syntax match testTitle /^.*$/ :hi def link testTitle Title Enter the next text: Уже угроза миновала Result is:  же угроза миновала Now I can see that letter. I do not know what happend but I did

Re: Is there a smarter way to get count into my function?

2009-03-04 Thread Maxim Kim
have been looking for. function! Hello(count) do smth useable here a:count echo a:count endfunction command! -count Hello call Hello(v:count) map ,ff :HelloCR Regards, Maxim Kim --~--~-~--~~~---~--~~ You received this message from the vim_use maillist. For more

Re: Is there a smarter way to get count into my function?

2009-03-04 Thread Maxim Kim
On 5 мар, 05:57, Tony Mechelynck antoine.mechely...@gmail.com wrote: On 04/03/09 20:30, Maxim Kim wrote: map ,ff :c-ucall Hello(v:count)CR function! Hello(count)    do smth useable here a:count    echo a:count endfunction command! -count Hello call Hello(v:count) map ,ff

Re: About Shift+Space

2009-03-03 Thread Maxim Kim
On 3 мар, 11:09, Wu Bingzheng wubingzh...@gmail.com wrote: Hi men,  nmap Space C-B it doesn't work. It works for me. Note: C-B doesn't move you cursor to the very top of buffer. If your cursor is on 10th line C-B has no visible effect. I use the follwing bindings instead: nnoremap Space

Re: About Shift+Space

2009-03-03 Thread Maxim Kim
On 4 мар, 08:30, Tony Mechelynck antoine.mechely...@gmail.com wrote: Here, Ctrl-B (directly or by mapping Space to it) moves the cursor to the ('scrolloff' + 1)th line. If I set 'scrolloff' to a high value () it still scrolls by a page. See also :help 'window'. As far as I can see C-B

Re: About Shift+Space

2009-03-03 Thread Maxim Kim
Thus I can't visually select every line with 20gg10C-B command for example. edit: Thus I can't visually select every line to the top of buffer with continiously hitting C-B command for example. --~--~-~--~~~---~--~~ You received this message from the vim_use

Is there a smarter way to get count into my function?

2009-03-03 Thread Maxim Kim
Hi, In the following example count gives me 0 or current linenumber +number that I prepend ,ff (3,ff gives me lnum+3). Is it possible to have exactly what was prepended to a command? function! Hello(count) if a:count 0 let cnt = 0 else let cnt = a:count endif echo cnt

for [k,v] in items(dict): Bug? Design?

2009-03-02 Thread Maxim Kim
Hi, the following vimscript gives me an error on plain vim72 with no patches applied: let mdict = {name: vimwiki, data:[]} for [key, value] in items(mdict) echo key value endfor E706: Variable type mismatch for: value. :h E706 gives some explanation -- it looks like there is change the type

Re: for [k,v] in items(dict): Bug? Design?

2009-03-02 Thread Maxim Kim
Just tried: let lst = [hello, []] for value in lst endfor Gives me the same error. I'd expect it to do :unlet key, :unlet value before each iteration. He he. Note on :h for made it clear. Note that the type of each list item should be identical to avoid errors for the type of {var}

Re: A trick to hide all global variables in plugin

2009-02-26 Thread Maxim Kim
On 27 фев, 09:38, Sean maxiangji...@gmail.com wrote: (2) no global variables can be accessed outside the plugin I have multiple files in my plugin, should I for variable in G in all of them? BTW, why do you want to hide global vars that you let user to define? I would hide only those globals

Syntax folding

2009-02-18 Thread Maxim Kim
Hi Is it possible to make syntax folding could fold the following text: ! Level 1 blablabla blablabla !! Level 2 blablabla blablabla blablabla !!! Level 3 blablabla blablabla blablabla !!! Level 3 blablabla blablabla blablabla !! Level 2 blablabla blablabla blablabla ! Level 1 blablabla

Re: Syntax folding

2009-02-18 Thread Maxim Kim
On Feb 18, 10:48 pm, Brett Stahlman brettstahl...@comcast.net wrote: On Feb 18, 10:55 am, Maxim Kim haba...@gmail.com wrote: You need to give level 2 the 'contained' attribute, and indicate that level 1 can contain level 2: e.g., :syntax region level1 start=/^![^!]\+.*/ end=/\n\+\ze

  1   2   >