App-Cheats

 view release on metacpan or  search on metacpan

cheats.txt  view on Meta::CPAN

# Call C++/CPP function from C Step 1(OMS)
# Put code inside:
#ifdef __cplusplus
# // c++ code goes here
#endif

# Call C++/CPP function from C Step 2(OMS)
# Make external the function
extern "C" void my_func(void);

# Macro function in c code (OMS,bison,flex)
#define DEBUG 1
#define PRINT_IN_DEBUG(token) if(DEBUG){ cout << "   Flex saw [" << yytext << "] (" << token << ")" << endl; }

# Use value from a string.
# Convert "std:string" to "const char *"
std::string name
name.c_str()

# Convert "std:string" to "char *"
std::string name

cheats.txt  view on Meta::CPAN

# Create a multiline Vim mapping
nnoremap <leader>r O
   \<CR>use v5.32;
   \<CR>use Mojo::Util 'dumper';
   \<CR>use Carp qw( croak confess carp cluck );
   \<CR>say "var: ", dumper $var;
   \<CR><ESC>


#############################################################
## Vim Record Macros
#############################################################

# Record a new macro (Vim)
qa       # Start recording. Will be put in register "a".
...      # Run any commands.
q        # Stop recording.

# View recorded macros (Vim)
# ^[ is ESC key
:reg



( run in 0.283 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )