Skip to content

Recommended extensions and configuration

Andrew Craig edited this page Apr 29, 2020 · 10 revisions

Mainly for RStudio user to find similar editor features in VSCode

Dots in variable/function names

Treat names.like.this as one word for selection etc.

settings.json:

"[r]": {
    "editor.wordSeparators": "`~!@#%$^&*()-=+[{]}\\|;:'\",<>/?"
}

C/C++

C/C++ to write Rcpp

.vscode/c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**",
                "${env:HOME}/R/x86_64-pc-linux-gnu-library/3.6/Rcpp/include",
                "/usr/share/R/include"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}

.clang-format:

---
Language: Cpp
BasedOnStyle: LLVM
Standard: Cpp11
ReflowComments: false
---

Settings:

"C_Cpp.commentContinuationPatterns": [
    "/**",
    "//'"
]

Debbuging: https://github.com/renkun-ken/vscode-rcpp-demo

Path Autocomplete

Path Autocomplete

"path-autocomplete.pathMappings": {
    "/": "/",
    "./": "${folder}"
}
Clone this wiki locally