GithubHelp home page GithubHelp logo

dawikur / algorithm-mnemonics.vim Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 6.0 754 KB

๐Ÿš€ Vim snippets for https://github.com/tommybennett/algorithm-mnemonics

License: MIT License

Vim Script 5.41% Vim Snippet 94.59%
vim vim-snippets algorithm-mnemonics cpp snippets

algorithm-mnemonics.vim's Introduction

Top Langs

algorithm-mnemonics.vim's People

Contributors

dawikur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

algorithm-mnemonics.vim's Issues

Allow snippet parameterization

In many places there is code like:

auto pos = std:: ... ();

We should be able to decide what is the actual type of pos object:

auto pos ... ;
const auto pos ... ;
auto const pos ... ;

There are also lambdas with parameter like auto const value. We can parameterize:

auto value
auto const value
const auto element
...

For now it should be OK to give 3 options for return objects:

// const on:
auto <obj> // None
auto const <obj> // Right
const auto <obj> // Left

// lambda parameter:
[] (<lambda_parameter>)

Prefix all vim helpfile tags

Vim's documentation http://vimhelp.appspot.com/helphelp.txt.html#help-writing says

The tag-name should be different from all the Vim help tag names and ideally
should begin with the name of the Vim plugin.

Since the plugin name is too long, I would consider a different prefix following common rules:

For instance, vim-latex includes a latex-help.txt file with the tag prefix latex-.

http://vimhelp.appspot.com/filetype.txt.html#ftplugin-docs would suggest something like
ft-cpp-snippets-stl-

Examples from http://vimhelp.appspot.com/filetype.txt.html#filetypes

[...] To search for help on a filetype prepend "ft-" and optionally append
"-syntax", "-indent" or
"-plugin". For example:
:help ft-vim-indent
:help ft-vim-syntax
:help ft-man-plugin

Note, the help command matches partials :h partial. You can still open with :h partial_sort_copy but :h stl-copy would open the description of the stl-snippet, but with :h copy you get the default vim help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.