Friday, October 31, 2014

Re: Override --prefix at runtime

On Fri, Oct 31, 2014 at 10:20:29PM -0700, Eric Pruitt wrote:
> Is there an environment variable or command line flag that can be set to
> override the compile-time "--prefix" option?

Found the answer -- the VIMRUNTIME environment variable does what I
want.

Eric

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Override --prefix at runtime

Is there an environment variable or command line flag that can be set to
override the compile-time "--prefix" option?

Eric

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Trouble using blockwise actions on visual selections in a function/command

Josef Fortier wrote:
> I'm trying to extend a "copy and comment" action (leveraging one of the numerous "smart comment" plugins). I've a simple line-wise command and was trying to extend to it work on a visual selection.
>
> It looks like vim is set to work linewise (and only linewise) here. Which is not ideal, as rather then commenting a block all at once, I end up with single line comment -> copy repetitions.
>
> Things I've tried:
>
> A command with -range. This is meant to work in a blockwise fashion
>
> A mapping to a function. I have trouble getting the start end end lines. I've tried using `< and `> but these values don't get set (maybe the function is called too soon?).
>
> It seems like there should be a way to manipulate visual blocks in a function, but it's not clear to me. Can someone offer assistance?
>
You might find the following plugins helpful:

vis.vim (http://www.drchip.org/astronaut/vim/index.html#VIS) :
Performs an arbitrary Ex command on a visual highlighted block
NrrwRgn.vim (http://www.vim.org/scripts/script.php?script_id=3075) :
Narrow Region plugin for Vim
:he /\%c regexp for restricting match to a specified column
:he /\%l regexp for restricting match to a specified line

Regards,
Chip Campbell



--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Vim Spreadsheets

I'd put a vote in for csv.vim combined with dbext (with DBI)

dbext allows a post-processing function which in combination with csv allows arbitrary SQL commands on a column basis, which comes close to the standard cell manipulations of a spreadsheet.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Trouble using blockwise actions on visual selections in a function/command

I'm trying to extend a "copy and comment" action (leveraging one of the numerous "smart comment" plugins). I've a simple line-wise command and was trying to extend to it work on a visual selection.

It looks like vim is set to work linewise (and only linewise) here. Which is not ideal, as rather then commenting a block all at once, I end up with single line comment -> copy repetitions.

Things I've tried:

A command with -range. This is meant to work in a blockwise fashion

A mapping to a function. I have trouble getting the start end end lines. I've tried using `< and `> but these values don't get set (maybe the function is called too soon?).

It seems like there should be a way to manipulate visual blocks in a function, but it's not clear to me. Can someone offer assistance?

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, October 30, 2014

.vimrc not always used

Hello!


I'm using the current version of MacVim (Sanpshot 73) on an iMac running
OS X 10.10 Yosemite.

I have in my home-directory the .vimrc-file attached below.
However the .vimrc is working only when opening first MacVim and then a
file in a tab. Opening a file via the context-menu or from MacVim via
the menu File > Open opens the file in a standard MacVim-window (see the
two attached screenshots).

Do you have an idea?

Thanks!


Regards,
Vlad

P.S. Here comes my .vimrc:

---
set guifont=Source\ Code\ Pro:h24

" window-size
set lines=43
set columns=80

" linebreak
set textwidth=72
set linebreak

" incremental search
set incsearch

" highlight search
set hlsearch

" stop highlight search by pressing <CR>
:nnoremap <CR> :noh<CR>/<BS>

" ignore case by search
set ignorecase

" linenumber
set number

" tabs
set shiftwidth=2
set tabstop=2
set expandtab

" clipboard
set clipboard=unnamed

" format options
set formatoptions+=r
set com-=fb:-

" colorscheme
" colorscheme oceandeep

" solarized?
set background=dark
colorscheme solarized

" syntax
syntax enable
"set syntax=vim
syntax on
"syntax off

" maping --------------------------------------------------------------

" für neue Zeile, ohne insert-mode (so wie beim o bzw. O)
map <S-Enter> O<Esc>
map <CR> o<Esc>

" CTRL-CR splitet die Zeile
:nmap <c-cr> i<cr><Esc>

"
" Makro's & Functions -------------------------------------------------
"

" Search in a specific column and count the hits ---------------------
fu! ColMatchCount(col,patt)
let n=0
:exe 'g/\%'.a:col.'c'.a:patt."/let n=n+1"
echo " String <".a:patt."> occurs ".n." times in the column >".a:col."<."
endfunction

:com! -nargs=* FCAll call ColMatchCount(<f-args>)
" REMEMBER!
" 1.- ;; or \
" 2.- space
" 3.- # (column, where to search)
" 4.- space
" 5.- string (what to search)
map ;; :FCAll
map \ :FCAll

" Search and count the hits ------------------------------------------
fu! MatchCount(patt)
let n=0
:exe 'g/'.a:patt."/let n=n+1"
echo " String <".a:patt."> occurs ".n." times."
endfunction

:com! -nargs=* FAll call MatchCount(<f-args>)

map ;;; :FAll
" REMEMBER!
" 1.- ;;;
" 2.- space
" 3.- string (what to search)

"
" ab hier test *** --- *** --- *** --- *** --- *** --- *** --- *** --- *** --- *** --- *** ---
"


if has("multi_byte")
if &termencoding == ""
let &termencoding = &encoding
endif
set encoding=utf-8
setglobal fileencoding=utf-8 bomb
set fileencodings=ucs-bom,utf-8,latin1
endif


"set showcmd
"
"if has("gui_running")
" if has("gui_gtk2")
" echomsg "GTK+2 GUI detected"
" set guifont=Courier\ New\ 14
" elseif has("gui_kde")
" echomsg "kvim gui detected"
" set guifont=Courier\ New/14
" elseif has("x11")
" echomsg "other X11 GUI detected"
" set guifont=-*-courier-medium-r-normal-*-*-200-*-*-m-*-*
" else
" echomsg "non-X11 GUI detected"
" set guifont=Courier_New:h14:cDEFAULT
" endif
" echomsg "guifont set to" &guifont
"endif

---

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Vim Spreadsheets

El martes, 25 de marzo de 2014 08:47:42 UTC-3, Pierre Masci escribió:
> Hi there, 
>
>
> I'm thinking using Vim for spreadsheets, for a few reasons:
>
>
>  - you can diff it ! (For me, that's the main reason)
>
>  - vim key mappings
>  - vimscript, so I can easily program it myself
>
>
>
>  - easy to add my own key mappings
>  - faster to open and save than Libreoffice
>
>
> I've done a bit of research and found these so far:
>
>
>
> - csv.vim:      
>
>
>       http://www.256bit.org/~chrisbra/csv.gif
>       https://github.com/chrisbra/csv.vim
>
>
>
>
> inspired by this advice for CSV files:
>        http://vim.wikia.com/wiki/Working_with_CSV_files
>
>
> seems to be maybe the best one at the moment... I haven't had the time to try it out yet
>
>
>  - spreadsheet.vim: 
>
>
>       http://www.vim.org/scripts/script.php?script_id=558
>
>
> seems dead (not updated for 11 years now). But might do the job anyway?
>
>
>  - vim-orgmode (vim plugin) => todo list, project planning 
>
>
>
>
>
>
>  - table-mode:    
>
>
>       https://www.youtube.com/watch?v=qA-ZT2r5-t0
>
>
>       http://www.vim.org/scripts/script.php?script_id=4501
>
>
> not really a spreadsheet... it seems like it's for displaying something as a table.
>
>
>
>
>
>  - Tcalc:      
>
>
>       http://tcalc.berlios.de/
>
>
> not really a spreadsheet: "allows you to to do all your accounting with plain text files using the full power of your favorite text editor". "It is a command line tool that operates as a filter. It processes your accounting files as it's input, performs all the calculations, and outputs a report in the format of the original file[s]."
>
>
>
>
>
>  - sc or slsc: 
>       ftp://space.mit.edu/pub/davis/slsc/
>
> a spreadsheet with vim-like keybindings, so not strictly Vim 
>
>
>
>
>
>
>
> Has anyone used any of these? How was it?
>
>
> Cheers =)
>
> -- Pierre Masci

Hello. I am working on a terminal spreadsheet based on "sc".
Anyone interested can take a look at:
https://github.com/andmarti1424/scim
Andres M.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: header files

Hi Shubham!

On Do, 30 Okt 2014, Shubham Shaw wrote:

> #include<dos.h> in gvim shows error what will be the correct header file that i should have to use to get the desired result

Please be more specific. Where do you see an error? What do you do? What
are you expecting? Perhaps show a screenshot.

Best,
Christian
--
Geige: Ein Instrument, das menschliche Ohr zu kitzeln, indem man
einen Pferdeschwanz an Katzendärmen reibt.
-- Ambrose Gwinnet Bierce

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

header files

#include<dos.h> in gvim shows error what will be the correct header file that i should have to use to get the desired result

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wednesday, October 29, 2014

Fw: vim freeze from inside gnu

Dear ping song,

please make sure to reply to the list or to all recipients as I instruct in the
last line of my signature:

<<<
Please reply to list if it's a mailing list post - http://shlom.in/reply .
>>>

And you didn't reply to my questions.

Regards,

Shlomi Fish

Begin forwarded message:

Date: Wed, 29 Oct 2014 10:10:10 -0400
From: ping song <songpingemail@gmail.com>
To: Shlomi Fish <shlomif@shlomifish.org>
Subject: Re: vim freeze from inside gnu


got that, resolved by restarting screen.
for now everything ok, and I just wanted to quick experiences, not
like reporting a reproducible bug.
thanks anyway.

On Sat, Oct 25, 2014 at 4:18 AM, Shlomi Fish <shlomif@shlomifish.org> wrote:
> Hi ping song.
>
> In addition, see:
>
> * http://www.catb.org/~esr/faqs/smart-questions.html
>
> * http://www.shlomifish.org/philosophy/computers/how-to-get-help-online/
>
> Regards,
>
> Shlomi Fish
>
> --
> -----------------------------------------------------------------
> Shlomi Fish http://www.shlomifish.org/
> My Aphorisms - http://www.shlomifish.org/humour.html
>
> Daniel: Hello ladies, may I join you?
> Buffy: Well, we're having a girls' talk, but… sure!
> — http://www.shlomifish.org/humour/Buffy/A-Few-Good-Slayers/
>
> Please reply to list if it's a mailing list post - http://shlom.in/reply .


--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
"So, who the hell is Qoheleth?" - http://shlom.in/qoheleth

I hope that you agree with me that 99.9218485921% of the users wouldn't bother
themselves with recompilation (or any other manual step for that matter) to
make their games run 1.27127529900685765% faster ;-) — Nadav Har'El

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: zsh, solarized: Random typed keys shown on screen with wierd colors.

I had the problem on my macbook pro 2010 before using tmux when using iterm2, so I guess this won't solve it.

Ory Band - אורי בנד


On Wed, Oct 29, 2014 at 11:36 AM, <romainlafourcade@gmail.com> wrote:
Le mardi 28 octobre 2014 09:29:28 UTC+1, Ory Band a écrit :
> Still, no one has a clue? This happens on almost every file type.
>
> Another idea - Maybe I should compile vim on my own and leave out / leave in some features?

Try removing these two lines from your vimrc:

    if $TMUX != "" | set term=screen-256color | endif
    set t_Co=256

--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/UVxDG3lMQ0U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: zsh, solarized: Random typed keys shown on screen with wierd colors.

Le mardi 28 octobre 2014 09:29:28 UTC+1, Ory Band a écrit :
> Still, no one has a clue? This happens on almost every file type.
>
> Another idea - Maybe I should compile vim on my own and leave out / leave in some features?

Try removing these two lines from your vimrc:

if $TMUX != "" | set term=screen-256color | endif
set t_Co=256

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tuesday, October 28, 2014

Re: zsh, solarized: Random typed keys shown on screen with wierd colors.

Still, no one has a clue? This happens on almost every file type.

Another idea - Maybe I should compile vim on my own and leave out / leave in some features?

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Monday, October 27, 2014

Re: how to join all lines in a paragraph?

On 10/26/2014 05:24 PM, Tim Chase wrote:
> It's definitely part of the command. The trick is knowing that
> "[cmd]" can include a range relative to the line(s) matched by the :g
> command. I had to dig around to find references in the help, but
> I found a couple examples using a range as part of the [cmd]:
>
> :help collapse
>
> as well as around lines 411 & 448 of ":help usr_25.txt".
>
> I do this all the time as it's very powerful. It's been in vi/ex as
> long as I know/remember, and even works in the venerable "ed".
>
> The only gotcha that I've found is when your relative ranges walk off
> the top/bottom of the file, triggering the aforementioned edge-cases.

Thanks! As the "resident Ex junkie"[1] :-) you've probably
shown this on-list before, but it's good to see examples in the
documentation as well. I've sent a small documentation patch to
make it explicit in :help :global.

Michael Henry

[1]: https://www.mail-archive.com/vim@vim.org/msg13769.html,
last paragraph.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sunday, October 26, 2014

Re: how to join all lines in a paragraph?

On 2014-10-26 16:27, Michael Henry wrote:
> On 10/26/2014 02:32 PM, Tim Chase wrote:
> > :g/^\n\</+;'}-j
>
> I understand how the above works, but I can't find justification
> for it in Vim's help. I'd break it down as follows:
>
> :g Begin "global" command
> /^\n\</ Find blank line followed by start of word
> + Go forward one line to start of paragraph
> ; Set cursor to above-calculated start of range
> '} Move to blank line after paragraph
> - Go backward one line to end of paragraph
> j Join lines in paragraph delimited by the range
>
> But looking at ``:help :g``, I see:
>
> :[range]g[lobal]/{pattern}/[cmd]
>
> The analysis above requires some features of a full-bown "range"
> (:help range) instead of just the ``/pattern/`` (:help pattern)
> that is permissible according to the help for ``:g``. Am I
> missing something here? I can't tell if the documentation for
> the global command should be expanded to cover this
> functionality beyond a simple pattern, or if the ability to use
> range-like features is accidental and not supposed to be part of
> the global command.

It's definitely part of the command. The trick is knowing that
"[cmd]" can include a range relative to the line(s) matched by the :g
command. I had to dig around to find references in the help, but
I found a couple examples using a range as part of the [cmd]:

:help collapse

as well as around lines 411 & 448 of ":help usr_25.txt".

I do this all the time as it's very powerful. It's been in vi/ex as
long as I know/remember, and even works in the venerable "ed".

The only gotcha that I've found is when your relative ranges walk off
the top/bottom of the file, triggering the aforementioned edge-cases.

-tim








--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: how to join all lines in a paragraph?

On 10/26/2014 02:32 PM, Tim Chase wrote:
> You can use the :j command to join a range of lines which works
> nicely with the range "'{,'}" or with a :g command such that you
> could do things like
>
> :g/^\n\</+;'}-j

I understand how the above works, but I can't find justification
for it in Vim's help. I'd break it down as follows:

:g Begin "global" command
/^\n\</ Find blank line followed by start of word
+ Go forward one line to start of paragraph
; Set cursor to above-calculated start of range
'} Move to blank line after paragraph
- Go backward one line to end of paragraph
j Join lines in paragraph delimited by the range

But looking at ``:help :g``, I see:

:[range]g[lobal]/{pattern}/[cmd]

The analysis above requires some features of a full-bown "range"
(:help range) instead of just the ``/pattern/`` (:help pattern)
that is permissible according to the help for ``:g``. Am I
missing something here? I can't tell if the documentation for
the global command should be expanded to cover this
functionality beyond a simple pattern, or if the ability to use
range-like features is accidental and not supposed to be part of
the global command.

Thanks,
Michael Henry

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: how to join all lines in a paragraph?

On 2014-10-26 11:12, Josh Hoff wrote:
> >>> I have been trying to find in google how to join all lines in a
> >>> given paragraph, or a range to lines.
> >>
> >> You could use visual mode: vipJ
> >
> >That was so simple I now feel embarrassed.
> >Thanks a lot!
>
> Cheers :). I bet there's a sneaky way to do it if you want a :
> command (maybe something using :normal?). That way you could get a
> range/selection/mark going.

You can use the :j command to join a range of lines which works
nicely with the range "'{,'}" or with a :g command such that you
could do things like

:g/^\n\</+;'}-j

which will join every line-separated paragraph(*) in your entire
document into single-line paragraphs.

-tim

(*) it expects a blank line before it so it might miss the first
paragraph in your document if there's not a blank line in before it.




--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Why does "set background" change my font colors?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On October 26, 2014 7:09:15 PM GMT+03:00, DwigtArmyOfChampions <dwightarmyofchampions@hotmail.com> wrote:
>I understand that "set background=dark" does not change the background
>color. "Setting this option does not change the background color, it
>tells Vim what the background color looks like." Okay, so why does that
>change the font colors that I've explicitly set in my colorscheme? And
>where can I control what happens if the user sets background to dark or
>light? (in other words, if background == dark, set the following light
>font colors to go with a dark background, else set these dark font
>colors to go with a light background)?
>
>--
>--
>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+unsubscribe@googlegroups.com.
>For more options, visit https://groups.google.com/d/optout.

It is a weird setting. Changing it outside of the colorscheme triggers setting colorscheme to default. Changing it before defining Normal highlighting group in colorscheme is useless because defining Normal group triggers calculating this setting. So I think you need to check it in the colorscheme (at the top), save there and set it again after defining Normal group (because automatic detection is constantly false, especially on 256 color terminals). You cannot protect your colorscheme from the user that set this option *after* loading the colorscheme, so just mention this fact in documentation.
-----BEGIN PGP SIGNATURE-----
Version: APG v1.1.1

iQI1BAEBCgAfBQJUTSXjGBxaeVggPHp5eC52aW1AZ21haWwuY29tPgAKCRCf3UKj
HhHSvrMPD/9S3kcmVUpQ7OwcteSap+wB1kksQg0Os0ZCO1Gppb91P1zDvsxB6Qwa
YUPjAnR6TwVcSUYm1YwxQdDbKkYnhGSMxdYBiGdWNO+M8lUMHKpmyJFBcSFHH57K
JYWMqjpwIZEQuyBIqCQIrJLIum7cYjjm3punMSWjNPl3YoA2pyRc1e3DGEPRb2JC
5NbMLFuQnjQG+G6nHgwfEgEgipR3HjFHJVVKFYIAC3weJGCfAk57UXytEKZHQ/P2
TFkp5RAhTpGu86YsV9QzbSV4nLUzc7ek9sum8p9hjR69jSoTRIKlfk8mVAeDAQai
0zERl0dpACcF/HcicLrQgA/iZ4RgQO7C3/sp0hRHWFiA3vgql+EgWblTs87V7aIm
2O+8haMfaX/tCG2e6n+95gQnFEZc9RdPa9qJSeshp9YkIm2cL7vTx0kwCwtxO7Np
p+Hn29uv+W0trUa8qnshMte+RKWTd2U4yX6ZNNM7amFrSCIo3Ys+MepWR7WMRUeu
A3Ox3VXyzVZ2+s+Fy3R7AwL/aMzmEAfFNMEI2dtqtNIfCehbZIkjeuZCojibhsWE
+Huw3NRvjl465Y++L0Wz1v65tBzCshXjXz7qnTjcY4Vqwe8KgOSwtLmnR78PRo0S
4+Zp5azmUFbh2AhOlrHNxpaXFRUn4X6nz2t/bHPLXT22YL8E4lHdCA==
=IZUQ
-----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

---
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: how to join all lines in a paragraph?

On Sun, Oct 26, 2014 at 12:08:53PM -0400, Jose Caballero wrote:
>>>
>>> I have been trying to find in google how to join all lines in a given
>>> paragraph, or a range to lines.
>
>>
>>
>> You could use visual mode: vipJ
>>
>
>
>That was so simple I now feel embarrassed.
>Thanks a lot!

Cheers :). I bet there's a sneaky way to do it if you want a : command
(maybe something using :normal?). That way you could get a
range/selection/mark going.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: how to join all lines in a paragraph?

>>
>> I have been trying to find in google how to join all lines in a given
>> paragraph, or a range to lines.

>
>
> You could use visual mode: vipJ
>


That was so simple I now feel embarrassed.
Thanks a lot!

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: how to join all lines in a paragraph?

On Sun, Oct 26, 2014 at 11:35:35AM -0400, Jose Caballero wrote:
>Hi,
>
>I have been trying to find in google how to join all lines in a given
>paragraph, or a range to lines.
>I only found this
>
>:set tw=1000000
>gggqJ
>
>or similar recipes.
>But that joins all lines in the file.I would be interested only in a
>portion of the file. How should I modify that recipe for that?

You could use visual mode: vipJ

>
>Thanks a lot in advance.
>Cheers,
>Jose
>
>--
>--
>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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

how to join all lines in a paragraph?

Hi,

I have been trying to find in google how to join all lines in a given
paragraph, or a range to lines.
I only found this

:set tw=1000000
gggqJ

or similar recipes.
But that joins all lines in the file.I would be interested only in a
portion of the file. How should I modify that recipe for that?

Thanks a lot in advance.
Cheers,
Jose

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Why does "set background" change my font colors?

I understand that "set background=dark" does not change the background color. "Setting this option does not change the background color, it tells Vim what the background color looks like." Okay, so why does that change the font colors that I've explicitly set in my colorscheme? And where can I control what happens if the user sets background to dark or light? (in other words, if background == dark, set the following light font colors to go with a dark background, else set these dark font colors to go with a light background)?

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: automatically insert closing parentheses

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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: automatically insert closing parentheses

On 2014-10-26 07:10, DwigtArmyOfChampions wrote:
> How do you make it so that Vim automatically inserts a closing
> parenthesis when you type an opening parenthesis? Or bracket? Or
> curly brace?

You'll want to read up at

http://vim.wikia.com/wiki/Automatically_append_closing_characters

which details far more than you likely care to know about it :-)

-tim


--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: automatically insert closing parentheses

On 10-26/ 7:10, DwigtArmyOfChampions wrote:
> How do you make it so that Vim automatically inserts a closing parenthesis when you type an opening parenthesis? Or bracket? Or curly brace?
>

Look at the plugin 'delimitMate'.

--
/"\ ASCII Ribbon Campaign
\ / - against HTML emails
X - against proprietory attachments
/ \ http://en.wikipedia.org/wiki/ASCII_Ribbon_Campaign

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

automatically insert closing parentheses

How do you make it so that Vim automatically inserts a closing parenthesis when you type an opening parenthesis? Or bracket? Or curly brace?

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Saturday, October 25, 2014

Re: starting vim with defined options



On Saturday, October 25, 2014, Tim Chase <vim@tim.thechases.com> wrote:
On 2014-10-25 12:39, Máté Timár wrote:
> I'm a beginner in using vim,

Welcome aboard!  We hope you find the adventure both fun and
productive.

> How can I launch vim via terminal (I have ubuntu) with my favourite
> options? When I open vim i have to set my favourite options all the
> time (like :colorscheme delek , :imap <TAB> <C-N> and so on ) , and
> it would be nice if I could set these via terminal when I open vim.
> Like: vim option_1 option_2 .... file

It sounds like you want to put these sorts of options in in your
~/.vimrc (or your $HOME/_vimrc on Win32).

You can issue

  :help vimrc

and read up on all the useful things you can do there.

-tim

I echo Tim's welcome.  There are literally hundreds of example .vimrc files for your perusing pleasure floating around on github.com as well. If your looking for ideas/inspiration.  

Good luck!!

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Ethan Alan

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: set background=dark not working in vimrc

On 25/10 10:56, Ethan Hereth wrote:
>On Saturday, October 25, 2014, Niels Kobschaetzki <niels@kobschaetzki.net>
>wrote:
>
>> Hi,
>>
>> I am using the solarized colorscheme which uses different colors
>> depending on background=light/dark.
>> When I manually do a ":set background=dark", I get the colors as
>> expected. But when I write
>> set background=dark
>> in my .vimrc, vim starts with a light background-setting anyway. Any
>> ideas what I could doing wrong? I checked all the files I am sourcing
>> whether there is a set
>> background=light but I can't find anything.
>>
>> Niels
>
>
>Niels,
>
>What does ':verbose set background' say? I would assume that another plugin
>might be resetting it.

Thanks a lot, that's it. I forgot that I have sunset.vim installed which
didn't have any effect on the theme I used the last 12 months or so m)

Niels

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: starting vim with defined options

On 2014-10-25 12:39, Máté Timár wrote:
> I'm a beginner in using vim,

Welcome aboard! We hope you find the adventure both fun and
productive.

> How can I launch vim via terminal (I have ubuntu) with my favourite
> options? When I open vim i have to set my favourite options all the
> time (like :colorscheme delek , :imap <TAB> <C-N> and so on ) , and
> it would be nice if I could set these via terminal when I open vim.
> Like: vim option_1 option_2 .... file

It sounds like you want to put these sorts of options in in your
~/.vimrc (or your $HOME/_vimrc on Win32).

You can issue

:help vimrc

and read up on all the useful things you can do there.

-tim


--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

starting vim with defined options

Hi!

I'm a beginner in using vim, and I have a question:

How can I launch vim via terminal (I have ubuntu) with my favourite options?
When I open vim i have to set my favourite options all the time (like :colorscheme delek , :imap <TAB> <C-N> and so on ) , and it would be nice if I could set these via terminal when I open vim. Like:
vim option_1 option_2 .... file

Does anyone has an idea about how it can be done?

Thanks in anticipation,

Mate

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: set background=dark not working in vimrc

Hi Niels!

On Sa, 25 Okt 2014, Niels Kobschaetzki wrote:

> Hi,
>
> I am using the solarized colorscheme which uses different colors
> depending on background=light/dark.
> When I manually do a ":set background=dark", I get the colors as
> expected. But when I write
> set background=dark
> in my .vimrc, vim starts with a light background-setting anyway. Any
> ideas what I could doing wrong? I checked all the files I am
> sourcing whether there is a set
> background=light but I can't find anything.

Place it after your colorscheme call (that one might unexpectedly change
it and there is also a bug still open).

Best,
Christian
--
Man kann nicht erwarten, daß ein rundlicher Mann gliech in ein
viereckiges Loch paßt. Man muß ihm Zeit geben, sich anzupassen.
-- Mark Twain (eigl. Samuel Langhorne Clemens)

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: set background=dark not working in vimrc



On Saturday, October 25, 2014, Niels Kobschaetzki <niels@kobschaetzki.net> wrote:
Hi,

I am using the solarized colorscheme which uses different colors
depending on background=light/dark.
When I manually do a ":set background=dark", I get the colors as
expected. But when I write
set background=dark
in my .vimrc, vim starts with a light background-setting anyway. Any
ideas what I could doing wrong? I checked all the files I am sourcing whether there is a set
background=light but I can't find anything.

Niels

Niels, 

What does ':verbose set background' say? I would assume that another plugin might be resetting it.

Ethan Alan  
--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Ethan Alan

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Starting vim with number and wrap set in diff mode

On 2014-10-25 14:30, LCD 47 wrote:
> Thus the trick is to start diff mode after loading the files,
> like this:
>
> vim -c 'diffsplit file2 | set nu wrap | winc l | set nu wrap' file1

Or you could issue the :set in all the windows using :windo which
allows the files at the end:

vimdiff -c "windo set nu wrap" file1 file2
vim -dc "windo set nu wrap" file1 file2

(I default to launching vimdiff at the command-line when I want to
diff, rather than using the "-d" parameter, but either should work)

-tim



--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Starting vim with number and wrap set in diff mode

On 24 October 2014, Steve Graham <solitary.wanderer52@gmail.com> wrote:
> I am starting vim in diff mode (vim -d) and find that I also need
> number and wrap set. I can start vim with it (as in vim -c 'set
> number' -c 'set wrap' -d file1 file2), but number and wrap are only
> set for the left window and not the right one.
>
> How can I have it set for both?

It can be done, but you probably won't like the solution. There are
only two command line options that seem relevant here:

* -c <command>, which runs <command> after loading the first file
* --cmd <command>, which runs <command> before loading any vimrc file

The first version has no effect on the second file. The second is
run too early:

vim --cmd 'set nu wrap' -d file1 file2

will set numbers, but wrap will get overridden by -d. And there is no
command that gets run after loading each file, or after loading all
files.

Thus the trick is to start diff mode after loading the files, like
this:

vim -c 'diffsplit file2 | set nu wrap | winc l | set nu wrap' file1

Or if you prefer to have the file names at the end:

vim -c 'exec "diffsplit " . argv(1) | set nu wrap | winc l | set nu wrap' file1 file2

/lcd

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: vim freeze from inside gnu

Hi ping song.

In addition, see:

* http://www.catb.org/~esr/faqs/smart-questions.html

* http://www.shlomifish.org/philosophy/computers/how-to-get-help-online/

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
My Aphorisms - http://www.shlomifish.org/humour.html

Daniel: Hello ladies, may I join you?
Buffy: Well, we're having a girls' talk, but… sure!
http://www.shlomifish.org/humour/Buffy/A-Few-Good-Slayers/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: vim freeze from inside gnu

Hi ping song,

On Fri, 24 Oct 2014 18:59:16 -0400
ping song <songpingemail@gmail.com> wrote:

> this is reproduced at this time.
> whenever I execute "register" command and hit enter, it freeze...
>
> in the begining it only happen in one of my gnu window, but now it
> happen in 3 of them... anyone experiences that?

1. What is "gnu"? From what I know it is the
https://en.wikipedia.org/wiki/GNU_Project which releases many software
packages. Which one are you using?

2. What is your OS/distro/etc. and versions thereof?

3. What is your version of vim, how are you using it?

Your message is really lacking on details.

Regards,

Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

God is Chuck Norris, for extremely large values of God.
http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

set background=dark not working in vimrc

Hi,

I am using the solarized colorscheme which uses different colors
depending on background=light/dark.
When I manually do a ":set background=dark", I get the colors as
expected. But when I write
set background=dark
in my .vimrc, vim starts with a light background-setting anyway. Any
ideas what I could doing wrong?
I checked all the files I am sourcing whether there is a set
background=light but I can't find anything.

Niels

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Friday, October 24, 2014

Starting vim with number and wrap set in diff mode

I am starting vim in diff mode (vim -d) and find that I also need number and wrap set. I can start vim with it (as in vim -c 'set number' -c 'set wrap' -d file1 file2), but number and wrap are only set for the left window and not the right one.

How can I have it set for both?

Thanks, Steve

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vim freeze from inside gnu

this is reproduced at this time.
whenever I execute "register" command and hit enter, it freeze...

in the begining it only happen in one of my gnu window, but now it
happen in 3 of them... anyone experiences that?

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: shortcuts for long filenames

On Thursday, October 23, 2014 1:02:03 PM UTC-5, B. Elijah Griffin wrote:
> DwigtArmyOfChampions wrote:
> > Oftentimes I'm opening really long filenames in command mode, for example:
> >
> > :e /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module
> >
> > Is there a way to create aliases for this file? Or if not the whole
> > file, how about part of the path, like everything up to and including
> > "modules"? That's a lot of typing!
>
> Have you considered tags? Often people don't create tags files by hand,
> but use a tool such as ctags, but you can hand create them or write your
> own tag file creation tool. The general original format is
>
> <tagname> <tab> <filename> <tab> <movement> <newline>
>
> Where the movement is an ex-mode movement such as a line number or
> /search/. In true vi you can put an ex-mode command, including edits,
> in the movement, vim is more restrictive.
>
> Say you create a tag file with this tag:
>
> jquitheme /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module 1
>
> Then you can use ":tag jquitheme" to go to the top line of it. You can
> also use "vi -t jquitheme" to start the editor there.
>
> If you don't think you have used tags before, you are probably wrong.
> The vim help system is just a special form of them.
>


There is no need to manually create entries for files in tags! ctags will include file names automatically, if you use "--extra=+f". See http://ctags.sourceforge.net/ctags.html

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thursday, October 23, 2014

Re: How to set vim to not display filename info when saving

On 2014-10-23, Romel Khan wrote:
> Here is what is happening: different users are actually running a
> program called myedit. So user are running say 'myedit file1'. The
> myedit program is actually running vim in it and editing a
> different file file2. People who run myedit edits the file using
> normal vi commands & thinking they are editing file1. They would
> be saving the normal :w, :wq or :x. I don't want the users to know
> that they actually ended up editing the file2 as that could be a
> security issue.
> I am not clear on how I can implement what you suggested and meet
> the above need.

If it's a security issue, then you don't want Vim to know the name
of the file, either. If Vim knows the name of the file, it would be
very easy for the user to find it.

A more secure approach would be to have myedit copy file2 to file1,
run vim on file1, then copy file1 to file2 when vim exits.

Regards,
Gary

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Focus returns to Vim's taglist window every time I execute the GDB `next` command in Conque GDB window

Den lørdag den 27. september 2014 22.40.53 UTC+2 skrev Lone Learner:
> I'll walk you through all the steps I used to install required
> software and setup my Vim with tagist and Conque GDB plugins and then
> explain my issue.
>
>
> ### What I installed ...
>
> I had Vim installed already.
>
> I installed ctags, Vim's taglist plugin and Vim's Conque GDB plugin.
>
> yum install ctags
> wget http://www.vim.org/scripts/download_script.php?src_id=19574
> -O taglist.zip
> unzip taglist.zip -d ~/.vim
> wget "http://www.vim.org/scripts/download_script.php?src_id=22163"
> -O conque_gdb.vmb
> vim +"silent so % | q" conque_gdb.vmb
>
>
> ### Sample C source code to reproduce the issue
>
> I wrote this little C source code file to demonstrate my issue.
>
> #include <stdio.h>
>
> int main()
> {
> printf("main 1\n");
> printf("main 2\n");
> printf("main 3\n");
> printf("main 4\n");
> return 0;
> }
>
> I saved this file as `foo.c`.
>
>
> ### Steps to reproduce the issue.
>
> First compile foo.c with debugging information enabled. Then I opened vim.
>
> $ gcc -g foo.c
> $ vim foo.c
>
> In Vim, perform the following commands.
>
> 1. Open taglist window with this command.
>
> :TlistOpen
>
> 2. Then press <kbd>Ctrl</kbd> + <kbd>w</kbd> followed by <kbd>w</kbd>
> to return to the source code window containing foo.c.
> 3. Then launch GDB to debug `a.out` compiled from `foo.c` with this command.
>
> :ConqueGdb a.out
>
> 4. In the GDB window, execute the following commands to set a
> breakpoint in `main` function and start debugging.
>
> break main
> run
> next
>
> 5. As soon as I execute the `next` command, I find myself back in the
> taglist window in insert mode, i.e. the cursor is back in the taglist
> window.
>
> Now it is a pain to press <kbd>Esc</kbd> to get back to normal mode,
> then press <kbd>Ctrl</kbd> + <kbd>w</kbd> <kbd>w</kbd>, etc. everytime
> to return back to the GDB window and then press <kbd>i</kbd> again to
> enter insert mode and continue debugging in the GDB window.
>
> Is there a way to prevent the cursor from returning to the taglist
> window every time I execute the `next` command in the GDB window?

Problem is solved in Conque GDB version 0.11.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: How to set vim to not display filename info when saving

Hi Romel,
(please don't top poste)

On Do, 23 Okt 2014, Romel Khan wrote:

> Here is what is happening: different users are actually running a program called myedit. So user are running say 'myedit file1'. The myedit program is actually running vim in it and editing a different file file2. People who run myedit edits the file using normal vi commands & thinking they are editing file1. They would be saving the normal :w, :wq or :x. I don't want the users to know that they actually ended up editing the file2 as that could be a security issue.
> I am not clear on how I can implement what you suggested and meet the above need.

And the users use Vi commands? What happens if they use in normal mode
<ctrl-g>? Then they will now that they are editing a different file.

Well, basically the idea is, create the custom :W command from my last
message and then use the cmdalias plugin to alias that command to :w
command. That needs to be done for all commands that save a file. I do
not think, there is an easier method.

Best,
Christian
--
Auf dem Markt glaubt niemand an höhere Menschen.
-- Friedrich Wilhelm Nietzsche

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shortcuts for long filenames

You could define an environment variable before you start vim, f.ex.
:e $JQ/filename
Would also be useful if you have to work in that directory at a shell prompt.

Regards, John Little

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: How to set vim to not display filename info when saving

Here is what is happening: different users are actually running a program called myedit. So user are running say 'myedit file1'. The myedit program is actually running vim in it and editing a different file file2. People who run myedit edits the file using normal vi commands & thinking they are editing file1. They would be saving the normal :w, :wq or :x. I don't want the users to know that they actually ended up editing the file2 as that could be a security issue.
I am not clear on how I can implement what you suggested and meet the above need.

On Thursday, October 23, 2014 1:34:09 AM UTC-4, Christian Brabandt wrote:
> Am 2014-10-23 02:49, schrieb Romel Khan:
> > When I save a file using vim, it displays the filename, number of
> > lines and number of characters being saved. Eg: "temp" 4L, 228C
> > written
> > How can I setup vim so it doesn't display this?
>
>
> You can use the :silent modifier to suppresses it.
>
> Knowing this, you could define your own command:
>
> :com! -bang -range=% -complete=file -nargs=? W :sil
> <line1>,<line2>write<bang> <args>
>
> And using the cmdalias¹ plugin you could alias :W to :w
>
> Best,
> Christian
>
> ¹) There appear to be at least 2 different cmdalias plugins:
> http://www.vim.org/scripts/script.php?script_id=4250
> http://www.vim.org/scripts/script.php?script_id=746

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: shortcuts for long filenames

DwigtArmyOfChampions wrote:
> Oftentimes I'm opening really long filenames in command mode, for example:
>
> :e /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module
>
> Is there a way to create aliases for this file? Or if not the whole
> file, how about part of the path, like everything up to and including
> "modules"? That's a lot of typing!

Have you considered tags? Often people don't create tags files by hand,
but use a tool such as ctags, but you can hand create them or write your
own tag file creation tool. The general original format is

<tagname> <tab> <filename> <tab> <movement> <newline>

Where the movement is an ex-mode movement such as a line number or
/search/. In true vi you can put an ex-mode command, including edits,
in the movement, vim is more restrictive.

Say you create a tag file with this tag:

jquitheme /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module 1

Then you can use ":tag jquitheme" to go to the top line of it. You can
also use "vi -t jquitheme" to start the editor there.

If you don't think you have used tags before, you are probably wrong.
The vim help system is just a special form of them.

:help tagsrch.txt
open the file with all tag search help

:help tags-file-format
open tagsrch.txt to the section with file format help

:help tag-security
open tagsrch.txt to the section explaining the true vi
security hole

:help 'tags
open options.txt to the section explaining how to set the
filenames to use for tag lookups


If you use tags names that match keywords in your code, you can do
more powerful things like use <ctrl-]> while the cursor is on that
keyword to jump to that tag. Find out what that function does at
a keystroke! Then use <ctrl-t> to pop the stack and return your
cursor to where you were before the <ctrl-]>.


Elijah

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

placeholder mapping

Does vim provide a placeholder key mapping construct, i.e. one that cannot be invoked from the keyboard?

Something like

nnoremap <cannot_be_pressed>[KEY] [STOCK_MAPPING]

It's probably not clear why I'm asking. I was trying to add ]c [c mappings for non-diff files without stepping on the existing diff mapping. Most approaches I tried ran into various issues with global mapping conflicts. The solution that worked for me was to map the stock behavior to a function key (which I don't use) and set up a function where I could execute normal one or the other. This is not bad (and can be extended) but it seems like there ought to be a behavior something like <Plug> or <Sid> for this situation.

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: shortcuts for long filenames

On Thursday, October 23, 2014 9:06:50 AM UTC-5, Tim Chase wrote:
>
> A couple ideas in addition to Jürgen's good suggestions:
>
> - you can use tab-completion, so you could type
>
> :e /v<tab>/www/h<tab>/si<tab>/all/m<tab>/jq<tab>
>
> or something like that
>

To expand on this: recursive directory search in tab completion!

:e /var/**/modules/jq<tab>

Or, add a path to Vim, and use ":find" (which also has tab completion):

:set path+=/var/www/html/sites/all/modules
:find jq<tab>

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: shortcuts for long filenames

Hi,

DwigtArmyOfChampions schrieb am 23.10.2014 um 16:24:
> Thanks! These are great! Second question: Is there an easy way to
> delete a word after pasting that text? Suppose I want to delete
> "modules/". Is there a quick way to do that without deleting each
> character through backspace?
>

just press Ctrl-W.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: shortcuts for long filenames

Thanks! These are great! Second question: Is there an easy way to delete a word after pasting that text? Suppose I want to delete "modules/". Is there a quick way to do that without deleting each character through backspace?

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: shortcuts for long filenames

On 2014-10-23 05:58, DwigtArmyOfChampions wrote:
> Oftentimes I'm opening really long filenames in command mode, for
> example:
>
> :e /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module
>
> Is there a way to create aliases for this file? Or if not the whole
> file, how about part of the path, like everything up to and
> including "modules"? That's a lot of typing!

A couple ideas in addition to Jürgen's good suggestions:

- you can use tab-completion, so you could type

:e /v<tab>/www/h<tab>/si<tab>/all/m<tab>/jq<tab>

or something like that


- You can store the things you want in a variable/register and then
recall them on the command-line using control+R to insert them:

:let @m='/var/www/html/sites/all/modules/' " do this once
:e <C-R>mjq<tab>jq*theme.module

where the "<C-R>m" inserts the contents of the register "m" in
which you stored the path you want. You can even set up multiple
registers if you have multiple paths. You can also use variables
if you prefer more descriptive (and less-likely to get tromped by
yanking/pasting), so you could do

:let mod='/var/www/html/sites/all/modules/' " do this once
:e <C-R>=mod<CR>jq<tab>jq*theme.module

- if you have other files open in the same directory, you can use the
'autochdir' setting to enter that directory which would make it as
simple as going into a sibling file's window/buffer and then
issuing

:e jq*theme.module

or some such command because you don't need to enter the path


I'm sure there are other snippets/plugins that would make this easy
as well, but the above have sufficed for me when I've had such a need.

-tim







--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: shortcuts for long filenames

Hi,

DwigtArmyOfChampions schrieb am 23.10.2014 um 14:58:
> Oftentimes I'm opening really long filenames in command mode, for
> example:
>
> :e> /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module
>
> Is there a way to create aliases for this file? Or if not the whole
> file, how about part of the path, like everything up to and including
> "modules"? That's a lot of typing!

you can define a simple command line abbreviation

cnoreabbrev mods /var/www/html/sites/all/modules/

But that would trigger every time you write the word "mods" on the
command line.

A better version of this abbreviation is

cnoreabbrev <expr> mods getcmdtype() == ":" && getcmdline() =~ '\smods$' ? '/var/www/html/sites/all/modules/' : 'mods'

This abbreviation checks that you are in colon mode (and not at the
search prompt) and makes sure 'mods' was at least separated from other
text by a whitespace character. That way you prevent 'mods' from being
expanded if it part of a file path or file name.

If you want a different name for the abbreviation make sure to replace
'mods' in all three places.

Regards,
Jürgen

--
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

shortcuts for long filenames

Oftentimes I'm opening really long filenames in command mode, for example:

:e /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module

Is there a way to create aliases for this file? Or if not the whole file, how about part of the path, like everything up to and including "modules"? That's a lot of typing!

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.