Re: 80 character limit
- From: Bob Harris <nospam.News.Bob@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 27 Aug 2005 13:07:04 GMT
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
.
- References:
- 80 character limit
- From: placid
- 80 character limit
- Prev by Date: Re: 80 character limit
- Next by Date: VIM 7: Which features will be added?
- Previous by thread: Re: 80 character limit
- Next by thread: VIM 7: Which features will be added?
- Index(es):
Relevant Pages
|