Tuesday, May 11, 2010

Re: Stair stepping

Gary Johnson <garyjohn@spocom.com> writes:

>> Not some gnome terminal, KDE terminal or some other jive.. just a
>> regular xterm.
>
> That's how I use Vim, too. My pasting works fine, like yours used
> to. I compared by version information with yours and I didn't see
> any X- or mouse-related differences that I thought were relevant.
> I'll list the differences below anyway. My Vim is also 7.2.411.

Thanks for a comprehensive post. Lots of stuff to look at and I don't
know what 95 % of it does...... even though I've used vim more or less
continuously for some 12-13 yrs now.

mouse=a here too. But I see the xterm versions are different.

I just use gentoo installer `emerge' and don't fuss with the compile
myself. But I do have a fairly long .vimrc

It may just be cruft in that... I think I'll post it inline below.
Maybe someone will see a problem there... its certainly a sloppy mess.
I don't use half of those iab settings... maybe I'll clean them up in
the sweet bye and bye...

cat .vimrc
------- --------- ---=--- --------- --------
set nocompatible " Use Vim defaults (much better!)
"" [HP 09/24/09 10:03 `filetype plugin on' is here from the README
" on perl-support.zip from:
" http://www.vim.org/scripts/script.php?script_id
filetype plugin on "
" # [HP 09/24/09 16:05 Ditto with the time/date settings,,
" perl-support/templates/* uses them]
" orig let g:Perl_FormatDate = '%D'
" orig let g:Perl_FormatTime = '%H:%M'
" orig let g:Perl_FormatYear = 'year %Y'
let g:Perl_FormatDate = '%m%d%y'
let g:Perl_FormatTime = '%H%M%S'
let g:Perl_FormatYear = 'year %Y'

filetype indent on " load indent.vim

"" [HP 09/24/09 16:07 This part below is from `sc' on vim list
" It's a way to get a new perlscript chmodded 755 but still let
" the perl-support plugins work for inserting stuff.
" From: sc <toothpik@swbell.net>
" Subject: Re: How to alter the behavior of perl-support plugin
" Newsgroups: gmane.editors.vim
" To: vim_use@googlegroups.com
" Date: Thu, 24 Sep 2009 15:47:11 -0500
" Message-ID: <200909241547.11778.toothpik@swbell.net>
" http://vim.wikia.com/wiki/Setting_file_attributes_without_reloading_a_buffer
function! SetExecutableBit()
if &modified
write
endif
" let fname = expand("%:p")
" checktime
" execute "au FileChangedShell " . fname . " :echo"
" silent !chmod 755 %
" checktime
let ta = system("chmod 755 " . expand('%'))
" execute "au! FileChangedShell " . fname
endfunction
command! Xbit call SetExecutableBit()
"" ]
"" ]

"""" Folding
set foldmethod=syntax " By default, use syntax to determine folds
set foldlevelstart=99 " All folds open by default

set vb t_vb= " Disable all bells/flashing.
set bs=2 " allow backspacing over everything in insert mode
"set ai " always set autoindenting on
" set rtp+=~/.vim/xpt

set backup " keep a backup file
set viminfo='20,\"100 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=200 " keep 50 lines of command line history
set ruler " show the cursor position all the time
"" [HP 092809_225105 laststatus=2 jacks up ruler ]
set laststatus=2
"" [HP Kill the splash screen
set shortmess+=I
"" ]
"" [HP 10/03/09_11:26:35 replaced set tabstop=3 with ts=2 sw=2 et
"" From: Tim Chase <vim@tim.thechases.com> on vim list
"" Date: Sat, 03 Oct 2009 10:35:24 -0500
"" Message-ID: <4AC76F3C.6050500@tim.thechases.com>
set ts=2 sw=2 et
set tabstop=3
'"" ]
set pastetoggle=<F4>

"" [HP Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
endif
"" ]

"" [HP Only do this part when compiled with support for autocommands.
if has("autocmd")

" In text files, always limit the width of text to 78 characters
autocmd BufRead *.txt set tw=72
autocmd BufRead .vimrc set tw=72
augroup cprog
" Remove all cprog autocommands
au!

" When starting to edit a file:
" For C and C++ files set formatting of comments and set C-indenting on.
" For other files switch it off.
" Don't change the order, it's important that the line with * comes first.
autocmd FileType * set formatoptions=tcql nocindent comments&
autocmd FileType c,cpp set formatoptions=croql cindent comments=sr:/*,mb:*,el:*/,://
augroup END
"" ]
"" [HP Set these so we get sensible formating in these files with no tabs
"" and a sensible shiftwidth
:au FileType perl,awk,sh,c set shiftwidth=2 expandtab
""======== BEGIN mappings ==========
nnoremap \tp :set invpaste paste?<CR>
nmap <F4> \tp
imap <F4> <C-O>\tp
"" ]

"" [HP 092809_230720 What the hell does this do
:nmap \ve :if &ve == '' <Bar>
\ set ve=all <Bar>
\ else <Bar>
\ set ve= <Bar>
\ endif <bar>
\ set ve? <Cr>
"" ]

"" [HP map z to act as a register selector eliminating the need to type
"" <shift><double quote>
nnoremap z "z
"" ]

"" [HP Make p in Visual mode replace the selected text with the "" register.
vnoremap p <Esc>:let current_reg = @"<CR>gvdi<C-R>=current_reg<CR><Esc>
"" ]

"" [HP Don't use Ex mode, use Q for formatting
map Q gq
"" ]

map ,d "=strftime("%c")<cr>p
nmap <F3> :g/^\(CVS:\)\( $\\|.*--[^ ]*$\\|.*Lines beginning\)/d<CR>:%s/^CVS: //
nmap <F10> :.,$s/^/## /
map <F8> :s/^## //<CR>j
map <F7> :s/^/## /<CR>j
"" [HP Make Insert key non-operational
imap <Ins> <Nop>
"" ]

"" ===== BEGIN iab ===========
iab sepr ------- ------- ---=--- ------- -------
"" ===== BEGIN Bash/Ksh Stuff =============
iab kbase myscript=$(basename $0)
iab bbase myscript=$(basename $0)
iab HERE usage(){<cr>cat >&2 <<EOM<cr>EOM<cr>}

No comments: