3

I use surround vim plugin. when I write a latex source for make a word to \bf similar to

hello w*orld 

( * is the cursor position) I use

ysiw}a\bf<space>

and get

hello {\bf *world}

exist a more simple way? or how I can insert \bf automatically?

JuanPablo
  • 23,792
  • 39
  • 118
  • 164
  • 2
    I know it's a bit off topic, but you should rather use `\textbf{foo}` instead of `{\bf foo}`,http://chenfuture.wordpress.com/2009/02/07/dos-and-donts-when-typesetting-a-document/ – epsilonhalbe May 02 '12 at 19:55

1 Answers1

5

I solved added this in my ~/.vimrc

let g:surround_42 = "{\\bf \r}"

and call over the word in normal mode

ysiw*

EDIT

is valid for the complete line with

yss*
JuanPablo
  • 23,792
  • 39
  • 118
  • 164