Re: 80 character limit



In article <1125122216.537700.111520@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
"placid" <Bulkan@xxxxxxxxx> wrote:

> Hi all,
>
> Does anyone know of any script (at vim.org or anywhere) that either
> limits
> the input for 80 characters or formats the input to 80 chars per line ?
>
> Regards

Besides the already mentioned textwidth=80 I have a few other tools to
help me:

"
" ',9' - Find lines that are greater than 80 characters long.
" Positions the cursor on the 81'st character.
"
noremap ,9 /.\%82v.*/<CR>


"
" ',tw' - Start searching from the beginning of the file
" for any lines that are longer than the current
" textwidth value. Use the 'n' and 'N'
" search next keys to repeat the search.
"
function! FindGreaterThanTextWidth()
let @/ = ".\\%" . (&textwidth + 2) . "v.*"
normal 1Gn
call histadd("search",@/)
endfunction
noremap ,tw :call FindGreaterThanTextWidth()<CR>

Bob Harris
.



Relevant Pages