[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
again on snippets
From: |
Andrea Crotti |
Subject: |
again on snippets |
Date: |
Sat, 30 Oct 2010 13:32:52 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) |
Still trying to make yasnippet even faster for c++ coding.
So suppose that I want to create a friend << operator
Something like:
--8<---------------cut here---------------start------------->8---
friend ostream& operator<<(ostream& s, const PadCoordinate& c);
--8<---------------cut here---------------end--------------->8---
and this would be the beginning of the definition
--8<---------------cut here---------------start------------->8---
ostream& operator<<(ostream& s, const PadCoordinate& c)
{
--8<---------------cut here---------------end--------------->8---
so basically it's the same thing but in the implementation and header
file there are some differences, and it would be good to avoid
duplication.
Is there a variable (is-header-file) in cc-mode (can't find it)?
And what about the different styles, someone like
fun() {
}
someone
fun () {
}
or
fun()
{
}
and so on, maybe the snippet should output with the correct style given
in the configuration.
- again on snippets,
Andrea Crotti <=