Re: Set 'filetype' by filename extensions

2012-01-30 Thread Clark J. Wang
On Tue, Jan 31, 2012 at 15:32, Christian Brabandt wrote: > On Tue, January 31, 2012 8:16 am, Clark J. Wang wrote: > > On Tue, Jan 31, 2012 at 15:11, Christian Brabandt > > wrote: > > > >> On Tue, January 31, 2012 8:05 am, Clark J. Wang wrote: > >> > I ha

Re: Set 'filetype' by filename extensions

2012-01-30 Thread Clark J. Wang
On Tue, Jan 31, 2012 at 15:11, Christian Brabandt wrote: > On Tue, January 31, 2012 8:05 am, Clark J. Wang wrote: > > I have some files named in the *.kshlib format which are ksh scripts but > > vim always recongnized them as "ft=conf". So how can I force vim to > >

Set 'filetype' by filename extensions

2012-01-30 Thread Clark J. Wang
I have some files named in the *.kshlib format which are ksh scripts but vim always recongnized them as "ft=conf". So how can I force vim to consider those files as "ft=sh"? I tried following in vimrc but it did not work: autocmd BufReadPost * \ if bufname('%') =~ '^.*\.kshlib$' |

Re: [vim] Problem with `inoremap jj '

2012-01-29 Thread Clark J. Wang
On Mon, Jan 30, 2012 at 15:38, Gary Johnson wrote: > On 2012-01-29, Clark J. Wang wrote: > > On Monday, January 30, 2012 2:56:37 PM UTC+8, Gary Johnson wrote: > > > > On 2012-01-29, Clark J. Wang wrote: > > > As recommended by other people I have

Re: [vim] Problem with `inoremap jj '

2012-01-29 Thread Clark J. Wang
On Mon, Jan 30, 2012 at 15:28, Jane Smith wrote: > On 30 Jan 2012, at 07:18, Benjamin R. Haskell wrote: > > > On Sun, 29 Jan 2012, Clark J. Wang wrote: > > > >> On Monday, January 30, 2012 2:24:55 PM UTC+8, Markus Osterhoff wrote: > >>> > >>>

Re: [vim] Problem with `inoremap jj '

2012-01-29 Thread Clark J. Wang
On Monday, January 30, 2012 2:56:37 PM UTC+8, Gary Johnson wrote: > > On 2012-01-29, Clark J. Wang wrote: > > As recommended by other people I have 'inoremap jj ' defined in my > vimrc > > and it works well for most of the time. > > > > A few days ago

Re: [vim] Problem with `inoremap jj '

2012-01-29 Thread Clark J. Wang
On Monday, January 30, 2012 2:49:03 PM UTC+8, Chris Lott wrote: > > On Sun, Jan 29, 2012 at 9:01 PM, Clark J. Wang wrote: > > As recommended by other people I have 'inoremap jj ' defined in my > > vimrc and it works well for most of the time. > > > > A f

Re: [vim] Problem with `inoremap jj '

2012-01-29 Thread Clark J. Wang
On Monday, January 30, 2012 2:24:55 PM UTC+8, Markus Osterhoff wrote: > > * Clark J. Wang [120130 07:01]: > > So I wonder if the `jj' mapping can be ignored when doing copy-n-paste > and > > only work when I'm typing from a keyboard. > :set paste > do your

[vim] Problem with `inoremap jj '

2012-01-29 Thread Clark J. Wang
As recommended by other people I have 'inoremap jj ' defined in my vimrc and it works well for most of the time. A few days ago when I copy-n-paste a lot of text into vim, the result was always wrong. It took me quite a while before I figured out that there was a substring "jj" included in the

subscribe

2010-10-19 Thread Clark J. Wang
. -- 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 set 'magic' to `very magic'?

2009-05-12 Thread Clark J. Wang
On May 12, 3:24 pm, Jürgen Krämer wrote: > Hi, > > Clark J. Wang wrote: > > The 'magic' can only be turned on or off. Can vim be configured to > > behave in the very magic way? Just like \v is entered every time I > > start a searching. > > no, it can&#

How to set 'magic' to `very magic'?

2009-05-11 Thread Clark J. Wang
The 'magic' can only be turned on or off. Can vim be configured to behave in the very magic way? Just like \v is entered every time I start a searching. --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://w

Re: How to redraw the whole vim screen after splitting new windows?

2009-03-31 Thread Clark J. Wang
On Mar 30, 10:38 pm, Charles Campbell wrote: > Clark J. Wang wrote: > > On Mar 27, 7:16 pm, "Clark J. Wang" wrote: > > >> I included %{winnr()} in the var `statusline'. But sometimes when I > >> splitted new windows the winnr() string on screen was

Re: How to define a function with optional arguments?

2009-03-31 Thread Clark J. Wang
On Mar 31, 6:14 pm, Tim Chase wrote: > > Some built-in vim functions support optional arguments. For example, > > we can write winnr() as well as winnr('$'). Can I define my own > > functions with optional arguments? I found no hints in vim's online > > help. > > The relevant help is at > >    :h

[vim script] How to define a function with optional arguments?

2009-03-31 Thread Clark J. Wang
Some built-in vim functions support optional arguments. For example, we can write winnr() as well as winnr('$'). Can I define my own functions with optional arguments? I found no hints in vim's online help. --~--~-~--~~~---~--~~ You received this message from the "v

Re: How to redraw the whole vim screen after splitting new windows?

2009-03-29 Thread Clark J. Wang
On Mar 27, 7:16 pm, "Clark J. Wang" wrote: > On Mar 27, 6:42 pm, Tim Chase wrote: > > > What are you trying to do that involves splits and redraws? > > > -tim > > I included %{winnr()} in the var `statusline'. But sometimes when I > splitted new

Re: How to redraw the whole vim screen after splitting new windows?

2009-03-27 Thread Clark J. Wang
On Mar 27, 6:42 pm, Tim Chase wrote: > > What are you trying to do that involves splits and redraws? > > -tim I included %{winnr()} in the var `statusline'. But sometimes when I splitted new windows the winnr() string on screen was not updated (try :vsplit and then :split). So I want to call `red

How to redraw the whole vim screen after splitting new windows?

2009-03-27 Thread Clark J. Wang
For window-related autocmds I only found WinEnter and WinLeave. Any idea? --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~--~~--~--~---

Re: How to move to a window by the value returned by winnr()?

2009-03-26 Thread Clark J. Wang
On Mar 27, 2:09 pm, hsitz wrote: > On Mar 26, 9:24 pm, "Clark J. Wang" wrote: > > > I want to define some shortcut keys to jump to a vim window by it's > > number. Anyone has any idea? > > If you know the window number I believe you can get there w

How to move to a window by the value returned by winnr()?

2009-03-26 Thread Clark J. Wang
I want to define some shortcut keys to jump to a vim window by it's number. Anyone has any idea? --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~--~~~~