Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cleaning up following osse's advice.

  • Loading branch information...
commit 440e3836d38ce5bc43e1a21ced02c2e24a39a612 1 parent 155a6bc
Romain Lafourcade authored
Showing with 13 additions and 14 deletions.
  1. +12 −12 helpers/functions.vim
  2. +1 −2  vimrc
24 helpers/functions.vim
View
@@ -5,22 +5,22 @@
" URLs pasted from Word or Powerpoint often have a newline
" this macro puts the URL in the href attribute
" of the next anchor
-command! An call UpdateAnchor()<CR>
+command! An :call UpdateAnchor()
function! UpdateAnchor()
- norm ^v$hy"_dd/href
+ normal! ^v$hy"_dd/href
f"vi""_dP
endfunction
-" DOS to UNIX encoding
+" DOS to UNIX encoding
command! ToUnix :call ToUnix()
-function! ToUnix()
- silent :update
- silent :e ++ff=dos
- silent :setlocal ff=unix
+function! ToUnix()
+ silent update
+ silent e ++ff=dos
+ silent setlocal ff=unix
silent w
endfunction
-" shows syntaxic group of the word under the cursor
+" shows syntaxic group of the word under the cursor
command! SynStack :call SynStack()
function! SynStack()
if !exists("*synstack")
@@ -29,7 +29,7 @@ function! SynStack()
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
-" normal characters --> HTML entities
+" normal characters --> HTML entities
command! Entities :call Entities()
function! Entities()
silent s/Á/\&Aacute;/e
@@ -272,7 +272,7 @@ function! Entities()
silent s/ζ/\&zeta;/e
endfunction
-" HTML entities --> normal characters
+" HTML entities --> normal characters
command! ReverseEntities :call ReverseEntities()
function! ReverseEntities()
silent s/&Aacute;/Á/e
@@ -515,7 +515,7 @@ function! ReverseEntities()
silent s/&zeta;/ζ/e
endfunction
-" normal characters --> URL encoded characters
+" normal characters --> URL encoded characters
command! URLencoding :call URLencoding()
function! URLencoding()
silent s/e/%20/e
@@ -673,7 +673,7 @@ function! URLencoding()
silent s/ÿ/%FF/e
endfunction
-" URL encoded characters --> normal characters
+" URL encoded characters --> normal characters
command! ReverseURLencoding :call ReverseURLencoding()
function! ReverseURLencoding()
silent s/%20/e/e
3  vimrc
View
@@ -57,8 +57,7 @@ set visualbell
set splitbelow
set splitright
-set clipboard^=unnamed
-set cmdheight=1
+set clipboard=unnamed
set cursorline
set fileformats="unix,dos,mac"
set formatoptions+=1
Please sign in to comment.
Something went wrong with that request. Please try again.