multiline snippet

trying to add a long multiline snippet, but only first line is pasted

snippet mytable
	${1:df} %>% datatable
     datatable(
  extensions = 'Buttons',
  options = list(
    dom = 'Blfrtip',
    buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
    lengthMenu = list(c(10, 25, 50, -1), c(10, 25, 50, "All"))
  )
)

The problem is with mixing tabs and spaces. Just single tab indent the block

snippet mytable
	${1:df} %>% datatable
	datatable(
	extensions = 'Buttons',
	options = list(
	dom = 'Blfrtip',
	buttons = c('copy', 'csv', 'excel', 'pdf', 'print'),
	lengthMenu = list(c(10, 25, 50, -1), c(10, 25, 50, "All"))
	)
	)

it worked, not pretty formatted, but it worked.

Is there any other condition to be met for the snippet to appear as a tooltip.? I mean, the rest of snippets when the keyword is typed, appears on a tooltip prior to accept it

Not sure. I find that I have to type very slowly to get the tooltip, if that's a factor.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.