#include //#define VERT_BLOCKS #ifdef VERT_BLOCKS #define BLOCK_TYPE EB_VERT #else #define BLOCK_TYPE EB_STREAM #endif int IsName() { char c = CurChar(); return isalnum(c) || c == '_'; } void main() { if (!IsName()) return; // no word under cursor - return if (CurCol != 1) { // if cursor is not at column 1, move Right(); // it to the first char of the word WordLeft(); } BlockBegin(BLOCK_TYPE); // start block marking while (IsName()) // while current char belongs to the Right(); // word, move cursor right #ifdef VERT_BLOCKS Left(); #endif BlockEnd(); // end block marking }