Guillaume Papin(@Sarcasm) has a thorough article about compilation databases.
% mkdir build
% (cd build; cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=YES ..)
% ln -s build/compile_commands.json
C++ 🕓 1 min ███████████▏░░░░░░░░░ 53.1% | |
JSON 🕓 0 secs █████████▊░░░░░░░░░░░ 46.9% |
class X {}; | |
class Y : public virtual X {}; | |
class Z : public virtual X {}; | |
class A : public Y , public Z {}; | |
/* | |
X --> +-----------+ | |
| 1 bytes | | |
+-----------+ |
option (FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE)if (${FORCE_COLORED_OUTPUT}) | |
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | |
add_compile_options (-fdiagnostics-color=always) | |
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | |
add_compile_options (-fcolor-diagnostics) | |
endif () | |
endif () |
Guillaume Papin(@Sarcasm) has a thorough article about compilation databases.
% mkdir build
% (cd build; cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=YES ..)
% ln -s build/compile_commands.json
emacs --daemon
to run in the background.
emacsclient.emacs24 <filename/dirname>
to open in terminal
NOTE: "M-m and SPC can be used interchangeably".
C-/
C-?
M-c
2. Upper Case : M-u
M-l