Couldn't get GVim maximum on KDE 4 , need help on debug it

2010-11-02 Thread Aaron Lewis
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,
I couldn't get gvim windows maximum on KDE4 , any ways to found the
problem ?

Actually i did a setup on kde's hot keys , and use some combinations to
get a window maximum state. But this just don't work well for GVim , i
won't occupy all the available space on my screen as other app does.

Thanks !

- -- 
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E
Key Server: http://keyserver.veridis.com
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJMz6jGAAoJECSSp9Df5sKetAoP/1XQ15F5Mz82NpNjXQ70tTAP
/cU/fVhb10JMp+4odTqlQWEaTmFLsbjrUU8oR6rSAGRsPz+wmPjOvzFDgtXWvdxh
4kCLP9zpr202zMYsN71lgobnX+Ith+2BMq6H9rK89qzQ31uLjJ296rJaMzDWshB3
VP/dO3jqV0VIJHdi8tRaxB0Xp6aC+xa4xzEBfvF1aTI/OkAhBFQ8IDACA6JvIu8Q
70F6gMz/xhGc9nOEVgzleM5wRuzZUAlVQ3s8GUQSrG3m4KgZOQakGYcD0zFCj5Jg
5K5XMawDYZit9GReU7FyknuMRtvPNm+wiwL89inBm2/l17GvUpS6cByQOHkSDAGT
KqhWL/B3YuoztUX/wJy+YHZi1T9IG9ML0wehAsr/9JhVIxHETZ84bJLkxRKhDPS2
BEkMPzx2UCj8W6oWsn+qyakkEpbzBikO+BXMIuzv7NbF0vc3TSJxud6tMDnQeM5j
4PHj9309z6AvmKkrL34t05xz7nqIJHFxoUyFwjhKpQ1wxX6GVsHbfDFdfK3rDKAE
UjimLzWx3pIfe2TgzuFtIqrDqLD0YF+Qe9TdMe4p4g6a6NWbOvqGfHgkuTIVF8A8
tokuZgqdEsT/u4AGB6zuHlNQJpxdKNvxmwfJHDQFlT4lrGEKShhDr5yvMuHzAkhK
Xk37BHEtUuJ8NyJe/4tl
=jtaF
-END PGP SIGNATURE-

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread Eran Borovik
In bash vi mode, one can press v and then get a full vim editor.
Then you will have everything you need.

Hope it helps,
Eran.

On 11/1/10, Tony Mechelynck antoine.mechely...@gmail.com wrote:
 On 01/11/10 19:23, aleCodd wrote:

 thanks for the reply.

 so what is the equivalent for the following:
  ino ( ()left
 using the readline module?

 I don't know. These are all bash questions, not Vim questions. Maybe a
 bash list or forum would be better than the Vim list. Have you read the
 bash manpage?


 and if you could please be more precise, is the readline library the only
 utility for mapping keys in bush?

 if yes, is there any interpreter i can use to convert Vim's mapping
 commands
 to readline commands?

 One other thing, is there a way to change the cursor shape and color -
 when
 running bash in vi mode - so that the shape and size of the cursor would
 be
 different for different modes (insert/normal), like the 't_SI' or
 'guicursor' in vim/gvim..?

 no AFAIK, because bash is not a modal editor


 cheers
 alex

 Regards,
 Tony.
 --
 The misnaming of fields of study is so common as to lead to what might
 be general systems laws.  For example, Frank Harary once suggested the
 law that any field that had the word science in its name was
 guaranteed thereby not to be a science.  He would cite as examples
 Military Science, Library Science, Political Science, Homemaking
 Science, Social Science, and Computer Science.  Discuss the generality
 of this law, and possible reasons for its predictive
 power.
   -- Gerald Weinberg, An Introduction to General Systems
  Thinking.

 --
 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 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: Nice display of leading tabs

2010-11-02 Thread Андрей Хитров
For tabs and trailing spaces I use those display settings
along with the theme desert. To my taste it looks pretty cool,
at least for development in Python.

 displaying tab characters and trailing spaces
 with special characters \u2592\u2591 and \u2593
set lcs=tab:▒░,trail:▓
set list

-- 
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: line number non copyable

2010-11-02 Thread statquant2

Hello JohnS
Thank you for your messages, I am already doing what you are suggesting (not
using gvim though)
Thanks for the insight

Cheers
-- 
View this message in context: 
http://vim.1045645.n5.nabble.com/line-number-non-copyable-tp3244877p3246342.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: line number non copyable

2010-11-02 Thread Gestorm
Hi, I've written a plugin to solve this problem, see
http://www.vim.org/scripts/script.php?script_id=2963

On 11月1日, 下午6时55分, statquant2 statqu...@gmail.com wrote:
 Hi guys,
 silly question, is it possible to set the line numbers such that you cannot
 copy them ?
 I like to have the line number but I am fed up with having to set nonu each
 time I want to copy with the mouse.
 In most editors I know, line numbers are visible but you cannot copy them
 ...

 Hope I have been clear enough.
 Thanks for reading

 Cheers
 --
 View this message in 
 context:http://vim.1045645.n5.nabble.com/line-number-non-copyable-tp3244877p3...
 Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: line number non copyable

2010-11-02 Thread Gestorm
Hi, I've written a plugin to solve this problem, see
http://www.vim.org/scripts/script.php?script_id=2963

On 11月1日, 下午6时55分, statquant2 statqu...@gmail.com wrote:
 Hi guys,
 silly question, is it possible to set the line numbers such that you cannot
 copy them ?
 I like to have the line number but I am fed up with having to set nonu each
 time I want to copy with the mouse.
 In most editors I know, line numbers are visible but you cannot copy them
 ...

 Hope I have been clear enough.
 Thanks for reading

 Cheers
 --
 View this message in 
 context:http://vim.1045645.n5.nabble.com/line-number-non-copyable-tp3244877p3...
 Sent from the Vim - General mailing list archive at Nabble.com.

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


how to convert emacs-syntax file to vim-syntax file

2010-11-02 Thread Johann Schatzer
Is there a simple way to convert a major emacs mode syntax file into an 
vim-syntax file?
-- 
Johann  Schatzer
PGP key: 0x4212C694


-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread aleCodd


Eran Borovik wrote:
 
 In bash vi mode, one can press v and then get a full vim editor.
 Then you will have everything you need.
 
 Hope it helps,
 Eran.
 

I still have 2 problems with that, first i don't know how to submit the
command back to bash after editing the command on vim, and second its really
over the top, to switch back and forth between bash and vim for every single
command.

another problem im struggling now, is to find out what is the equivalent to
:noremap in when binding keys in .inputrc for bash.

I mean, sure you can bind the following:
a:b
but how do you bind:
a:aa
because this will not work because it will enter into an ENDLESS LOOP by
remapping the 'a' character to itself...

cheers
alex
-- 
View this message in context: 
http://vim.1045645.n5.nabble.com/Using-Bash-in-Vi-mode-How-to-map-keys-tp3245193p3246648.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread ZyX
Reply to message «Re: Using Bash in Vi mode. How to map keys?», 
sent 15:40:29 02 November 2010, Tuesday
by aleCodd:

 I still have 2 problems with that, first i don't know how to submit the
 command back to bash after editing the command on vim, and second its
 really over the top, to switch back and forth between bash and vim for
 every single command.
 
 another problem im struggling now, is to find out what is the equivalent to
 :noremap in when binding keys in .inputrc for bash.
 
 I mean, sure you can bind the following:
 a:b
 but how do you bind:
 a:aa
 because this will not work because it will enter into an ENDLESS LOOP by
 remapping the 'a' character to itself...
Maybe you should try switching to zsh: its zle (z line editor) is highly 
configurable. Though it does not have an equivalent to `noremap', you could 
bind 
keys to functions: your example could be written like that:

function _-ins-aa() { LBUFFER+=aa }
zle -N ins-aa _-ins-aa
bindkey a ins-aa

Not as obvious as `noremap a aa' (or `bindkey -s a aa' that results in ``zsh: 
string inserting another one too many times'' error), but it works.

It also has a vi mode and I saw an answer on stackoverflow that explains how to 
change prompt when switching from/to `normal' mode: 
http://stackoverflow.com/questions/3622943/zsh-vi-mode-status-line (links in 
this question are also useful). It looks like bash does not have such option.


signature.asc
Description: This is a digitally signed message part.


Re: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread Christian Brabandt
Hi ZyX!

On Di, 02 Nov 2010, ZyX wrote:
 It also has a vi mode and I saw an answer on stackoverflow that 
 explains how to change prompt when switching from/to `normal' mode: 
 http://stackoverflow.com/questions/3622943/zsh-vi-mode-status-line 

Here is another example:
http://www.bewatermyfriend.org/posts/2010/08-08.21-16-02-computer.html


regards,
Christian

-- 
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 moving code block problem

2010-11-02 Thread Ben Fritz


On Nov 1, 4:51 am, John Beckett johnb.beck...@gmail.com wrote:
 Zhanglistar wrote:
  Vim manual says that to move to the start of the outer block
  use the [[ command. But when I use [[, it jumps to the
  head of file, which is a C program. And I when I use ]], it
  jumps to the end of the C file.

 Vim is not a compiler and it has no idea where functions start
 and stop. Your code probably differs from the style expected by
 Vim, my guess being that your '{' is not in the left margin (see
 ':help 29.3').


Vim does, however, have a decent idea where {..} pairs start and end.
So as a workaround you could probably use [] or ][ (which you say are
working} followed by %.

Or, you could use vaB to select the entire {..} block, then aB again
as needed until you have the entire function. Then switch back and
forth from end to end using o.

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread aleCodd


ZyX wrote:
 
 
 Maybe you should try switching to zsh: its zle (z line editor) is highly 
 configurable. Though it does not have an equivalent to `noremap', you
 could bind 
 keys to functions: your example could be written like that:
 
 function _-ins-aa() { LBUFFER+=aa }
 zle -N ins-aa _-ins-aa
 bindkey a ins-aa
 
 Not as obvious as `noremap a aa' (or `bindkey -s a aa' that results in
 ``zsh: 
 string inserting another one too many times'' error), but it works.
 
 

Can I be more specific?
I want to bind in bash something equivalent to:
:inoremap  left

Now, this mapping is so common that i'm sure that millions of people have
tried it before me (for Bash), so would you say that still there is NO WAY
that i can bind the above in .inputrc for bash?
 

-- 
View this message in context: 
http://vim.1045645.n5.nabble.com/Using-Bash-in-Vi-mode-How-to-map-keys-tp3245193p3246832.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread ZyX
Reply to message «Re: Using Bash in Vi mode. How to map keys?», 
sent 17:47:30 02 November 2010, Tuesday
by aleCodd:

 Can I be more specific?
 
 I want to bind in bash something equivalent to:
 :inoremap  left
 
 Now, this mapping is so common that i'm sure that millions of people have
 tried it before me (for Bash), so would you say that still there is NO WAY
 that i can bind the above in .inputrc for bash?
I use «,s», «,f», «,u», «,h», «,» «,'» for «()», «{}», «», «[]», «», «''» 
respectively. Having «» mapped to «» is very annoying when I do not need to 
have two double strokes what is common. And having to type symbols from the top 
row even without shift (programmer dvorak) is inconvinient.


signature.asc
Description: This is a digitally signed message part.


wm and tw cause formatting problem

2010-11-02 Thread Anthony Campbell
In insert mode, if a line starts with - the next line is indented. This is
not what I want. 

After a lot of experimenting, I found that it was because either
textwidth or wrapmargin was set to a non-zero value. Is there any way to
get round this? I do need to set textwidth but I don't want to have to
keep correcting lines with initial -.


-- 
Anthony Campbell - a...@acampbell.org.uk 
Microsoft-free zone - Using Debian GNU/Linux 
http://www.acampbell.org.uk - sample my ebooks at
http://www.smashwords.com/profile/view/acampbell

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread aleCodd


ZyX wrote:
 
 I use «,s», «,f», «,u», «,h», «,» «,'» for «()», «{}», «», «[]», «»,
 «''» 
 respectively. Having «» mapped to «» is very annoying when I do not
 need to 
 have two double strokes what is common. And having to type symbols from
 the top 
 row even without shift (programmer dvorak) is inconvinient.
  
 

hmm...what do you mean by 's' ?
can you please explain 1)what key do you bind 2)and how is it done in
.inputrc

cheers
-- 
View this message in context: 
http://vim.1045645.n5.nabble.com/Using-Bash-in-Vi-mode-How-to-map-keys-tp3245193p3246958.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread ZyX
Reply to message «Re: Using Bash in Vi mode. How to map keys?», 
sent 19:15:44 02 November 2010, Tuesday
by aleCodd:

 hmm...what do you mean by 's' ?
Do not use google groups, it fucks up unicode symbols. It is was a ``,s'' 
enclosed in \u00ab and \u00bb (left and right double angle quotation 
marks), 
googlegroups turn them into  and . In zshrc I have the following code:

bindkey  -M evi,h ins-brackets
...
bindkey  -M evi,S ins-parentheses-escaped

where all ins-* are custom zle widgets. It is not the right place to discuss 
their implementation, but here is similar code from my vimrc:
inoremap ,ef   C-oI{C-mC-oo}C-oO
inoremap ,eFC-m{C-mC-oo}C-oO
inoremap ,F  {C-oo}C-oO
inoremap ,f   {}C-\C-oh
inoremap ,h   []C-\C-oh
inoremap ,s   ()C-\C-oh
inoremap ,uLTC-\C-oh
inoremap ,es   (C-\C-oEC-oa)C-\C-oh
inoremap ,H   [[::]]C-oF:
inoremap ,eh[::]C-oF:
inoremap ,q   «»C-\C-oh
inoremap ,Q   „“C-\C-oh
inoremap ,eq  “”C-\C-oh
inoremap ,eQ  ‘’C-\C-oh
inoremap ,   C-\C-oh
inoremap ,'   ''C-\C-oh

Note that `,q', `,Q', `,eq' and `,eQ' lines will probably be also fucked up by 
googlegroups, so it is better to view this message somewhere else, perhaps in a 
mail client.

Here is from ipythonrc. Ipython uses readline, so it should be easy to port it 
to .inputrc:
readline_parse_and_bind ,s: ()\C-b
other lines are similar.

 can you please explain 1)what key do you bind 2)and how is it done in
 .inputrc
I am using zsh, so nothing is done in inputrc.


signature.asc
Description: This is a digitally signed message part.


Re: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread aleCodd

thanks so much
just for curiosity, why do you have in the last 5 or so commands the c-/,
why is not the c-o enough to enter a normal mode command before returning
to insert mode..

and just to make sure, bindkey is a zsh command, and if so how do you rate
zsh vs. bash when it comes to command line editing, which is more vi-like
configurable?
-- 
View this message in context: 
http://vim.1045645.n5.nabble.com/Using-Bash-in-Vi-mode-How-to-map-keys-tp3245193p3247044.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: BS and set list problem

2010-11-02 Thread itx
thanks for help.

What does Vim answer to

   :verbose set list? listchars? lazyredraw?
   :if !has('gui_running') | verbose set t_kb? t_kD? | endif

and what appears if (in Insert or Command-line mode) you hit Ctrl-
V (or Ctrl-Q if you use Ctrl-V to paste into Vim) followed by
Backspace?


:verbose set list? listchars? lazyredraw?
set list listchars=eol:$ nolazyredraw


if !has('gui_running') | verbose set t_kb? t_kD? |endif
t_kb? BSt_kD? DEL

Ctrl-Q followed by Backspace   BS

:set backspace? backspace=indent,start,eol
this seems that all these options were default ?



but it seems that the backspace didn't  work properly  when i  : set
list  (i didn't change listchars)

for instance
i type FOUR hardtabs in a new line
it appears as ^I^I^I^I  and  then i just type ONE BS, these four
tabs were deleted

but when i :set listchars=tab:\ \ or someothers or :set nolist  it
works properly just as i wanted,i.e. these tabs were deleted after i
type FOUR BS

o, i think that maybe BS just delete the display tabstop
characters a time.
thus it will delete 8 chars and ^I^I^I^I is 8 chars,so it was
deleted
or other reasons?

Best regards
itx

On 11月2日, 上午3时34分, Tony Mechelynck antoine.mechely...@gmail.com
wrote:
 On 01/11/10 17:08, itx wrote:

  when i   set list  and then type four tab in a newline like

  \t\t\t\t
  when iset list, i type backspce for juse one time
  this four tabs were delete ,

  but when i set nolist  ,i works well
  why

  my settings

  set tabstop=8
  set noexpandtab
  set backspace=indent,eol,start

 If you :set list, and 'listchars' is unset, every hard tab you type
 should appeat as ^I

 If you :set list, and 'listchars' has a properly set tab: subentry,
 then that should be used to display hard tabs. To display them as
 spasces, use for instance

 :set list listchars=tab:\ \ ,eol:$

 (two backslash-escaped spaces: see :help option-backslash ).

 In both cases, the backspace ought to work properly...

 What does Vim answer to

 :verbose set list? listchars? lazyredraw?
 :if !has('gui_running') | verbose set t_kb? t_kD? | endif

 and what appears if (in Insert or Command-line mode) you hit Ctrl-V (or
 Ctrl-Q if you use Ctrl-V to paste into Vim) followed by Backspace?

 Best regards,
 Tony.
 --
 Eternal nothingness is fine if you happen to be dressed for it.
 -- Woody Allen

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread ZyX
Reply to message «Re: Using Bash in Vi mode. How to map keys?», 
sent 19:57:06 02 November 2010, Tuesday
by aleCodd:

 just for curiosity, why do you have in the last 5 or so commands the c-/,
 why is not the c-o enough to enter a normal mode command before returning
 to insert mode..
Because it moves one character left at the end of line and does not move 
anything in the middle.

 and just to make sure, bindkey is a zsh command, and if so how do you rate
 zsh vs. bash when it comes to command line editing, which is more vi-like
 configurable?
While you are using zsh, you can configure almost anything. I do not know how 
to 
bind a key to a custom function that does something with the command line, but 
I 
do not say that this is impossible: I switched to zsh when I had three aliases, 
two binds and no functions in my bashrc, so I do not have enough experience in 
configuring bash. In zsh I do not use normal/insert modes, but have some vim-
like keybindings: C-o that can execute some commands in «normal» mode, 
C-r*, 
a bunch of «,*» mappings. If you want to compare, try asking on stackoverflow 
how to imitate vim's C-o in bash while having a emacs keys, based on those 
answers I could yield more useful comparison.

I also know, that in zsh you may setup as many modes as you want: that 
indicator 
was based onto the fact that zsh was changing its keymap when moving between 
vicmd/viins, so it is not something hard-coded like in bash.

In some recent topics discussed on zsh mailing list there was an experimental 
implementation of dynamic higlighting (though it was capable almost only for 
higlighting command as alias/command/builtin/function). Can you imagine 
something like that implemented without patching in bash?


signature.asc
Description: This is a digitally signed message part.


Re: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread aleCodd


ZyX wrote:
 
 Reply to message «Re: Using Bash in Vi mode. How to map keys?», 
 sent 19:57:06 02 November 2010, Tuesday
 by aleCodd:
 
 just for curiosity, why do you have in the last 5 or so commands the
 c-/,
 why is not the c-o enough to enter a normal mode command before
 returning
 to insert mode..
 Because it moves one character left at the end of line and does not move 
 anything in the middle.
 
 what do you mean by that? c-o waits for a command and reenters insert
 mode, but where does it MOVE?
 
 and just to make sure, bindkey is a zsh command, and if so how do you
 rate
 zsh vs. bash when it comes to command line editing, which is more vi-like
 configurable?
 While you are using zsh, you can configure almost anything. I do not know
 how to 
 bind a key to a custom function that does something with the command line,
 but I 
 do not say that this is impossible: I switched to zsh when I had three
 aliases, 
 two binds and no functions in my bashrc, so I do not have enough
 experience in 
 configuring bash. In zsh I do not use normal/insert modes, but have some
 vim-
 like keybindings: C-o that can execute some commands in «normal» mode,
 C-r*, 
 a bunch of «,*» mappings. If you want to compare, try asking on
 stackoverflow 
 how to imitate vim's C-o in bash while having a emacs keys, based on
 those 
 answers I could yield more useful comparison.
 
 I also know, that in zsh you may setup as many modes as you want: that
 indicator 
 was based onto the fact that zsh was changing its keymap when moving
 between 
 vicmd/viins, so it is not something hard-coded like in bash.
 
 In some recent topics discussed on zsh mailing list there was an
 experimental 
 implementation of dynamic higlighting (though it was capable almost only
 for 
 higlighting command as alias/command/builtin/function). Can you imagine 
 something like that implemented without patching in bash?
 
  really appreciate your detailed explanation, so i guess immigrating to
 zsh land will make things easier in the end, too bad that it will take
 another month or so to get used to it with all its commands etc.
 

-- 
View this message in context: 
http://vim.1045645.n5.nabble.com/Using-Bash-in-Vi-mode-How-to-map-keys-tp3245193p3247173.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread aleCodd


Reply to message «Re: Using Bash in Vi mode. How to map keys?», 
sent 19:57:06 02 November 2010, Tuesday
by aleCodd:

 just for curiosity, why do you have in the last 5 or so commands the
 c-/,
 why is not the c-o enough to enter a normal mode command before
 returning
 to insert mode..
Because it moves one character left at the end of line and does not move 
anything in the middle.
unquote

what do you mean by that? c-o waits for a command and reenters insert
mode, but where does it MOVE?


 and just to make sure, bindkey is a zsh command, and if so how do you
 rate
 zsh vs. bash when it comes to command line editing, which is more vi-like
 configurable?
 While you are using zsh, you can configure almost anything. I do not know
 how to 
 bind a key to a custom function that does something with the command line,
 but I 
 do not say that this is impossible: I switched to zsh when I had three
 aliases, 
 two binds and no functions in my bashrc, so I do not have enough
 experience in 
 configuring bash. In zsh I do not use normal/insert modes, but have some
 vim-
 like keybindings: C-o that can execute some commands in «normal» mode,
 C-r*, 
 a bunch of «,*» mappings. If you want to compare, try asking on
 stackoverflow 
 how to imitate vim's C-o in bash while having a emacs keys, based on
 those 
 answers I could yield more useful comparison.
 
 I also know, that in zsh you may setup as many modes as you want: that
 indicator 
 was based onto the fact that zsh was changing its keymap when moving
 between 
 vicmd/viins, so it is not something hard-coded like in bash.
 
 In some recent topics discussed on zsh mailing list there was an
 experimental 
 implementation of dynamic higlighting (though it was capable almost only
 for 
 higlighting command as alias/command/builtin/function). Can you imagine 
 something like that implemented without patching in bash?
 unquote
  really appreciate your detailed explanation, so i guess immigrating to
 zsh land will make things easier in the end, too bad that it will take
 another month or so to get used to it with all its commands etc.
 

-- 
View this message in context: 
http://vim.1045645.n5.nabble.com/Using-Bash-in-Vi-mode-How-to-map-keys-tp3245193p3247177.html
Sent from the Vim - General mailing list archive at Nabble.com.

-- 
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: BS and set list problem

2010-11-02 Thread Tony Mechelynck

On 02/11/10 18:39, itx wrote:

thanks for help.

 What does Vim answer to

:verbose set list? listchars? lazyredraw?
:if !has('gui_running') | verbose set t_kb? t_kD? | endif

 and what appears if (in Insert or Command-line mode) you hit Ctrl-
V (or Ctrl-Q if you use Ctrl-V to paste into Vim) followed by
Backspace?


:verbose set list? listchars? lazyredraw?
set list listchars=eol:$ nolazyredraw


if !has('gui_running') | verbose set t_kb? t_kD? |endif
t_kb?BS t_kD?DEL

Ctrl-Q followed by BackspaceBS

:set backspace? backspace=indent,start,eol
this seems that all these options were default ?



but it seems that the backspace didn't  work properly  when i  : set
list  (i didn't change listchars)

for instance
i type FOUR hardtabs in a new line
it appears as ^I^I^I^I  and  then i just type ONEBS, these four
tabs were deleted

but when i :set listchars=tab:\ \ or someothers or :set nolist  it
works properly just as i wanted,i.e. these tabs were deleted after i
type FOURBS

o, i think that maybeBS  just delete the display tabstop
characters a time.
thus it will delete 8 chars and ^I^I^I^I is 8 chars,so it was
deleted
or other reasons?

Best regards
itx


I don't know: I couldn't reproduce your symptoms (in gvim with GTK2 GUI 
on Linux).

- What platform are you using? Windows? Mac? Linux? Other(which)?
- You seem to be using Console Vim: in which terminal? Windows console? 
Mac Terminal.app? Linux(text)? xterm? konsole? mlterm? gnome-terminal? 
other(which)?


Best regards,
Tony.
--
If you explain so clearly that nobody can misunderstand, somebody
will.

--
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread Benjamin R. Haskell

On Tue, 2 Nov 2010, aleCodd wrote:


Reply to message «Re: Using Bash in Vi mode. How to map keys?»,
sent 19:57:06 02 November 2010, Tuesday
by aleCodd:

just for curiosity, why do you have in the last 5 or so commands the 
c-/, why is not the c-o enough to enter a normal mode command 
before returning to insert mode..
Because it moves one character left at the end of line and does not 
move anything in the middle.

unquote

what do you mean by that? c-o waits for a command and reenters 
insert mode, but where does it MOVE?



From :help i_CTRL-\_CTRL-O



The CTRL-O command sometimes has a side effect: If the cursor was beyond 
the end of the line, it will be put on the last character in the line. 
In mappings it's often better to use Esc (first put an x in the 
text, Esc will then always put the cursor on it).  Or use CTRL-\ 
CTRL-O, but then beware of the cursor possibly being beyond the end of 
the line.



--
Best,
Ben

--
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: Using Bash in Vi mode. How to map keys?

2010-11-02 Thread ZyX
Reply to message «Re: Using Bash in Vi mode. How to map keys?», 
sent 21:15:14 02 November 2010, Tuesday
by aleCodd:

  what do you mean by that? c-o waits for a command and reenters insert
  mode, but where does it MOVE?
Just try it while at the end of non-empty line and see where cursor moves. 
Don't 
you think that there is some purpose of existance of C-\C-o alongside with 
C-o?

   really appreciate your detailed explanation, so i guess immigrating to
  
  zsh land will make things easier in the end, too bad that it will take
  another month or so to get used to it with all its commands etc.
Zsh has reasonable wizard that creates initial zshrc and does not require much 
time to get used to it if you are already familiar with bash. Most of bash 
functions will work in zsh as well, but you will need to rewrite prompt and 
bindings (it looks like they can not invoke any functions so it is easy with 
``binkey -s'').

It also has some very useful modules: zpty (an analog of expect), zmv 
(rename/copy/link files); ttyctl (restores tty settings after application 
exited 
or crashed), PCRE regex support, hooks for everything, globbing flags (capable 
of replacing `find' and any `find | ... | xargs ...' pipe, though with some 
perfomance penalty), parameter expansion flags (for example, escaping a string 
stored in a variable no more requires sed, just ${(qqq)VAR}), highly 
configurable completion... Just start using and you'll never want to switch 
back.

PS: It was hard to find where is the text you wrote.

PPS: Most of the message is an offtopic here.


signature.asc
Description: This is a digitally signed message part.


Re: wm and tw cause formatting problem

2010-11-02 Thread Simon Ruderich
On Tue, Nov 02, 2010 at 04:03:51PM +, Anthony Campbell wrote:
 In insert mode, if a line starts with - the next line is indented. This is
 not what I want.

 After a lot of experimenting, I found that it was because either
 textwidth or wrapmargin was set to a non-zero value. Is there any way to
 get round this? I do need to set textwidth but I don't want to have to
 keep correcting lines with initial -.

This could be caused by the 'formatoptions' setting, check :h
'formatoptions' and :h fo-table for more information.

Hope this helps,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9


pgp7jD4D7D9MM.pgp
Description: PGP signature


How to eliminate $- from php words

2010-11-02 Thread Tim Johnson
using vim huge version with GTK2 GUI on ubuntu 10.04

I mean to eliminate the following characters:

'$' , '-', and ''  (ascii 36,45,62)
from php word syntax.

Neither 
:setlocal iskeyword-=$- 
as an ex command nor
autocmd BufRead,BufNewFile *.php setlocal iskeyword-=$-
in .vimrc 
has the effects that I am looking for.

to test my efforts I invoke : set iskeyword and see the
following
:iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_, 
where ascii 45 and 62 are still present.

What am I doing wrong?
thanks
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com

-- 
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: How to eliminate $- from php words

2010-11-02 Thread sc
On Tuesday 02 November 2010 18:48:30 Tim Johnson wrote:

 using vim huge version with GTK2 GUI on ubuntu 10.04

 I mean to eliminate the following characters:

 '$' , '-', and ''  (ascii 36,45,62)
 from php word syntax.

 Neither

 :setlocal iskeyword-=$-

 as an ex command nor
 autocmd BufRead,BufNewFile *.php setlocal iskeyword-=$-
 in .vimrc
 has the effects that I am looking for.

 to test my efforts I invoke : set iskeyword and see the
 following

 :iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_,

 where ascii 45 and 62 are still present.

 What am I doing wrong?

first, test my theory by testing iskeyword with

:verbose set iskeyword?

then, if i'm right, create a

~/.vim/after/syntax/php.vim

ok, scratch that -- i just looked and php.vim does not tamper
with iskeyword -- perhaps you have a plugin installed that is
setting it -- so tell us what you see when you do the verbose
query

sc

-- 
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: How to eliminate $- from php words

2010-11-02 Thread Tim Johnson
* sc tooth...@swbell.net [101102 16:20]:
 On Tuesday 02 November 2010 18:48:30 Tim Johnson wrote:
. 
 first, test my theory by testing iskeyword with
 
 :verbose set iskeyword?
.. 
 ok, scratch that -- i just looked and php.vim does not tamper
 with iskeyword -- perhaps you have a plugin installed that is
 setting it -- so tell us what you see when you do the verbose
 query
 Here you go...
 iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_, 

 And I don't recall the vim command to list out plugins, but
 If I invoke the following:
 gvim --noplugin hello.php
 and then run 
 :verbose set iskeyword?
 I get
 iskeyword=@,48-57,_,192-255
 Last set from ~/.vimrc 
  and you are correct: A plugin is doing it. 
 And which is it?
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com

-- 
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: How to eliminate $- from php words

2010-11-02 Thread sc
On Tuesday 02 November 2010 19:51:49 Tim Johnson wrote:

 * sc tooth...@swbell.net [101102 16:20]:
  On Tuesday 02 November 2010 18:48:30 Tim Johnson wrote:

 .

  first, test my theory by testing iskeyword with
 
  :verbose set iskeyword?

 ..

  ok, scratch that -- i just looked and php.vim does not
  tamper with iskeyword -- perhaps you have a plugin installed
  that is setting it -- so tell us what you see when you do
  the verbose query

 Here you go...
 iskeyword=38,42,43,45,47-58,60-62,64-90,97-122,_,

 And I don't recall the vim command to list out plugins, but
 If I invoke the following:
 gvim --noplugin hello.php
 and then run

 :verbose set iskeyword?

 I get
 iskeyword=@,48-57,_,192-255
 Last set from ~/.vimrc
  and you are correct: A plugin is doing it.
 And which is it?

the verbose query will tell you, by providing a Last set
from line -- you have not shown us that, you've only shared
the verbose query from your --noplugin session

sc

-- 
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: How to eliminate $- from php words

2010-11-02 Thread Tim Johnson
* sc tooth...@swbell.net [101102 17:11]:
 On Tuesday 02 November 2010 19:51:49 Tim Johnson wrote:
 
 the verbose query will tell you, by providing a Last set
 from line -- you have not shown us that, you've only shared
 the verbose query from your --noplugin session
  I apologize for the oversight. I think the problem was coming from
  my session file. 
  I have placed the following:
  setlocal iskeyword=@,48-57,_,192-255
  in 
  ~/.vim/after/syntax/php.vim
  As well, I ran the command above from ex, and then saved my
  session file.

  Thanks for getting me on track here.
  I think I have the solution.
  cheers
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com

-- 
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: BS and set list problem

2010-11-02 Thread lingkun
2010/11/3 Tony Mechelynck antoine.mechely...@gmail.com

 On 02/11/10 18:39, itx wrote:

 thanks for help.


 What does Vim answer to

:verbose set list? listchars? lazyredraw?
:if !has('gui_running') | verbose set t_kb? t_kD? | endif

 and what appears if (in Insert or Command-line mode) you hit Ctrl-
 V (or Ctrl-Q if you use Ctrl-V to paste into Vim) followed by
 Backspace?


 :verbose set list? listchars? lazyredraw?
 set list listchars=eol:$ nolazyredraw


 if !has('gui_running') | verbose set t_kb? t_kD? |endif
 t_kb?BS t_kD?DEL

 Ctrl-Q followed by BackspaceBS

 :set backspace? backspace=indent,start,eol
 this seems that all these options were default ?



 but it seems that the backspace didn't  work properly  when i  : set

 list  (i didn't change listchars)

 for instance
 i type FOUR hardtabs in a new line
 it appears as ^I^I^I^I  and  then i just type ONEBS, these four
 tabs were deleted

 but when i :set listchars=tab:\ \ or someothers or :set nolist  it
 works properly just as i wanted,i.e. these tabs were deleted after i
 type FOURBS

 o, i think that maybeBS  just delete the display tabstop
 characters a time.
 thus it will delete 8 chars and ^I^I^I^I is 8 chars,so it was
 deleted
 or other reasons?

 Best regards
 itx


 I don't know: I couldn't reproduce your symptoms (in gvim with GTK2 GUI on
 Linux).
 - What platform are you using? Windows? Mac? Linux? Other(which)?
 - You seem to be using Console Vim: in which terminal? Windows console? Mac
 Terminal.app? Linux(text)? xterm? konsole? mlterm? gnome-terminal?
 other(which)?

 Best regards,
 Tony.
 --
 If you explain so clearly that nobody can misunderstand, somebody
 will.

sorry for that i forgot to list the settings when i do the test.
   :set ts=8
   :set sts=8
   :set noet
er, I was using gvim 7.2( offical version ) on windowsXP . To get the
settings of t_kb and t_kD, i run vim in the windows console, and they
all have the same symptoms.

Best regards,
itx.

-- 
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: How to eliminate $- from php words

2010-11-02 Thread John Little
On Nov 3, 12:48 pm, Tim Johnson t...@johnsons-web.com wrote:

 :setlocal iskeyword-=$-
 What am I doing wrong?

(I see others are getting you where you want to go, but they didn't
answer this question directly).
That'll never work, for at least two reasons.

1. iskeyword is a comma separated list of items.  The above attempts
to remove one item $-.
2. Even if the setting of iskeyword had separate items for $, -, and
, unless they appear in the setting *in that order* :set -= would not
remove them; one has to remove them one at a time.  F.ex.,
:set isk=a,b,c,d,e,f,g,h,i,j
:set isk-=b,c works, b,c is found
:set isk-=e,g doesn't work silently
:set isk-=e isk-=gworks
3. :set doesn't have the intelligence to convert to ascii, say a minus
to 62.
4. :set doesn't have the intelligence to split up 60-62 into 60,61,62
then remove the 62.

You can see that :set has some general mechanisms for setting options,
but no smarts for a particular option... though I'd not be surprised
if there are exceptions to that.

Regards, John

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