Editor help - does it work with macros ?
Posted: Sun May 14, 2017 8:09 pm
Or perhaps is there a way to add similar fuctionality ?
I'd like to be able to define string of chars when working with C, but there is no simple way of doing this.
In C, "my_string_abc" makes a string (= that text + \n" ) somewhere in predefined read-only data space of a program.
When I want to set the value of the elements of char array, I have to use signle qoutes around { 'e' , 'a' , 'c' , 'h', '_', 'c' , 'h' , 'a' , 'r' }, which is killing me.
Quick workaround is to make a simple CLI util which would accept my string and generate separate header file that I could then include.
But that is major drain on my love of life and PITA in general.
Is there a way that I could have some sort of plugin/macro that could automate such things ?
I'd like to be able to define string of chars when working with C, but there is no simple way of doing this.
In C, "my_string_abc" makes a string (= that text + \n" ) somewhere in predefined read-only data space of a program.
When I want to set the value of the elements of char array, I have to use signle qoutes around { 'e' , 'a' , 'c' , 'h', '_', 'c' , 'h' , 'a' , 'r' }, which is killing me.
Quick workaround is to make a simple CLI util which would accept my string and generate separate header file that I could then include.
But that is major drain on my love of life and PITA in general.
Is there a way that I could have some sort of plugin/macro that could automate such things ?