Gist plugin on Sublime Text is too slow - gist

Gist plugin on Sublime Text is too slow. It takes several seconds(only 4 short snippets) to download all my gists to local and show them in Sublime Text. No way I could manage 100 snippets this way.
Is there any way to customize the code and use eager loading to download all my snippets to local? So that I can access all my local snippets and sync to gist.github.com when necessary.
https://github.com/condemil/Gist
Thanks!
Nick

Related

How do I add my own completions to sublime text 3?

I've been looking everywhere for an answer and I can't seem to make sense of anything I find. There's either to references to files that don't exist in my installation, or the file does exist but is just raw hexadecimal data rather than code. For example, I keep seeing that I should look in my packages/(insert programming language here) folder to access autocompletion files for that particular language. Unfortunately, when I click browse packages, the folder only contains a bz2 folder and a User folder.
I'm trying to modify sublime text's PHP autocompletion and make it so that whenever I type
<?
I can hit enter and it would autocomplete to
<?php ?>
with the cursor set between the tags. I've seen this as well but as I said earlier I've had problems getting any of these solutions to work for me.
How do I add this simple autocompletion to my sublime text 3?
You can do that by adding snippets. Just go to Tools > New Snippet.... There's a lot of docs about how to write a snippet.
Also, in your case, you can install the Additional PHP Snippets and trigger that completition by typing php and hitting tab

Sublime Text 3 - SASS (scss) autocomplete variables from another files

I have two files:
variables.scss:
$my_var: #fff;
module.scss:
#import 'variables';
.body { background: $my_var;}
And Visual Studio provides me nice hints - when I'm typing $my in module.scss I see all variables from imported files that matches to $my.
Simple.
But Sublime Text 3 autocompletes only variables from module.scss, not from other imported files. I have installed All Autocomplete package, it doesn't work... Any ideas? It is important feature for me...
Question was answered here: Sass support for sublime text 3
From that link:
You can install Emmet (formerly Zen Coding), it is an extremely powerful tool to do css (and scss), example :
I type bi and press tab and it gives me : background-image: url(|); (with the | your cursor).
If you are interested, please take a look at this:
Emmet for sublime, and all the abbreviation (Emmet is very good with HTML too -- look what is happening when you type, for example, nav>ul>li...)
Now, how to make it works with scss:
The answer is here
You have to install the package sass-textmate-bundle for scss and do what I have wrote.
If you need sass and not scss, check this answer, especially the second response from Alexander Ekdahl
I had the same issue. This is what fixed the problem for me:
Have an active tab with SASS (SCSS) file and then go to Preferences > Settings - More > Syntax Specific - User
Paste this "word_separators": "./\\()\"':,.;<>~!##%^&*|+=[]{}`~?"
Save and profit.
Hope it helps. There is this github issue if you want to have more information.
I got this working using the AllAutocomplete plugin
The biggest drawback to using this plugin is that the file that it reads the variables from has to be open. Unfortunately I haven't found any better way to achieve this.
Sublime text 3 support?
This plugin didn't work for me out of the box with ST3. I had to make a small modification to the user settings file to get it to work.
"word_separators": "./\\()\"':,.;<>~!##%^&*|+=[]{}`~?",
Adding this to your user sublime settings file should do the trick. Here is the github issue where this originated from.
https://github.com/alienhard/SublimeAllAutocomplete/issues/18

Auto update changed paths like Dreamweaver, Possible in Sublime Text?

I recently started using Sublime Text 3, mostly for HTML and CSS and still learning the tricks.
In Dreamweaver, if I change a linked file/folder name or move it to different folder (within the project folder), it asks if all the html file containing those links should be updated and if confirmed it does updated the all the files in the project folder automatically, even the unopened files are updated! It saves a lot of time and errors.
This is the only feature I missed in Notepad++ when I used it for few projects.
Now, I am wondering if the above feature is there in Sublime Text (by default or with the help of some plug ins)?
I will greatly appreciate any helpful suggestion.
This feature is not present in Sublime by default, nor in any plugins of which I am aware, and although it is theoretically possible to write such a plugin it would be quite computationally intensive to have the feature "live". I find it much easier to keep CSS, JS, and markup in defined directories, and not move them around after creating them :)
You have to keep in mind that Notepad++ and Sublime Text are text editors, not IDEs, and so don't have all of the features of giant programs like Dreamweaver that are hundreds of times their size. Their primary purpose is editing and otherwise manipulating text, and ST at least (I'm not terribly familiar with N++) has a nice plugin API for writing functions to assist with that (such as inserting the path to a file), and people have even been able to write much more complex plugins to do things like linting and code intelligence, but things like keeping an eye on large groups of files and changing them all in response to certain events, or completely refactoring significant amounts of code, just isn't what it's designed for.

Is there a way to create templates for text files in Eclipse?

In Eclipse, I really enjoy being able to create templates for things I commonly write in Java and XML. While there is some room for improvement, templates have proven to be quite the time saver. Today I was documenting some notes in the release notes. We have a specific format that we write said release notes in. I thought it would be handy to write a small template so that I could easily insert most of the boiler plate text when I amend the notes. So I dug around the eclipse settings and didn't see anything for plain text files. I googled around and also didn't see anything.
So is what I'm wanting to do possible in Eclipse? Is there a plugin I would need to enable such a feature?
I assume the closest you can get is using Snippets
Add the view by clicking Window -> Show View -> Snippets. In that view, right-click and select Customizeto create custom snippets. You can now add those snippets in your textfile by double-clicking them.
Maybe there is also some shortcut feature I didn't find yet...

View markdown files offline [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
The community reviewed whether to reopen this question 10 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Is there a way to display .md files offline so we know what it will look like once it's uploaded in Github? I'm referring to showing the README.md file as it would come out in Github, and not as for editing purposes.
Needs to work on Mac and Windows since I use both.
There are a few Chrome plug-ins that work well. I've been using Markdown Preview Plus.
After install, enable "Allow access to file URLs" in Extensions (menu > More tools > Extensions or enter URL chrome://extensions/ instead).
Then drag-n-drop a Markdown file onto Chrome and use your favorite editor to edit.
I wrote Grip a while ago to do exactly this. It renders exactly like it does on GitHub and provides several additional options too:
In addition to READMEs, Grip can renders GitHub comments and issues
Click through local links to render other .md files
An API to use in your own projects
Export to an HTML file
Install with pip:
pip install grip
Then go to the directory that contains your README file and run:
grip
Pass -h for additional help and options.
Here's a screenshot of Grip rendering Grip's README:
Check it out here.
Atom by Github. Gives you a side by side preview.
Visual Studio Code - the new editor by Microsoft also provides very good support for markdown editing.
You can download it from here.
The editor provides good support to toggle between the markdown code and the preview mode.
It also provides reasonably good intellisense support for all the markdown syntax.
The editor is free for use and is also cross platform (works on Linux, Windows and Mac).
For more details you can check on their website
Late to the party, but have a look at MarkdownPad.
See Python-Markdown-Editor
It is based on :
Python-Markdown
Pygments (code block syntax highlighting)
CodeMirror (javascript code editor)
Bottle
Install with pip :
$ pip install markdown-editor
It features when-you-type preview, code highlight, fenced code blocks, github style
it can be used by commandline :
$ markdown_edit
$ markdown_edit README.md
$ markdown_edit -f readme.html README.md
I created this to build a tool for sending code reviews, it is easily extensible, by importing it as a module you can add custom actions.
I just installed https://github.com/ypocat/gfms. It does a very good job rendering github flavored markdown. It detects changes in your markdown, so you just put your browser and editor side-by-side. It is Node.js, so it should work fine on any platform.
If you have Node.js is installed, the installation is simple:
sudo npm install -g gfms
gfms --port 9999 (in your project directory)
http://localhost:9999/ (open with any browser)
I found a way to view it in PHP. After doing some more snooping I found 2 solutions for offline and online viewing of .md files:
Offline: https://github.com/WolfieZero/Markdown-Viewer-PHP
Online: http://daringfireball.net/projects/markdown/dingus
I recommend the offline version so you can do your editing even while you're doing your business on the throne. :)
There are people who does not use Google Chrome. There is a Firefox add-on called Markdown Viewer which is able to read Markdown files offline.
pandoc is a nice Text-To-Text conversion tool that solves the problem of offline visualization of your Markdown. Just issue:
pandoc -f markdown -t html README.md > README.html
have you tried ReText? It is a nice desktop Markdown editor
I found MarkView Google Chrome extension pretty useful, actually it's working like a charm:
MarkView is a Chrome extention for editing and viewing markdown file with an outline view, support multiple table format styles, code block syntax highlight and Github Flavored Markdown.
Features:
Editing and Viewing markdown file in web page style.
Auto reload local file when file is changed (Post-installation:
select "Allow access to file URLs" option in chrome://extensions/)
Show outline beside the content in scrollable way
Have buttons for GoTop, ViewSource and GoBottom
Support Github Flavored Markdown table styles and code highlight.
Highlight the code area for programming languages(eg. ```ruby)
Support web pages printing with decent outlook(Chrome->File->Print...)
Responsive: when the window size small than 940px, outline section will
automatically hidden; resize bigger than 940px, outline section will display.
MarkView will view all markdown files except those under raw.github.com
because that subdomain only displays the source.
More features have been added to MarkView:
WYSIWYG markdown editor
Themes and Code Styling Selection
Support Footnotes1 ↩
Instant Slides Presentation
Document Custom Styling
Add Theme CSS and Select
Add Code Style and Select
Write CSS, Save and Run
I like the vertical splitter in Downmarker, you can see the changes as you write!
You can use texts as a md viewer and md editor, its lightweight and neat.
Geany has a plugin for markdown which does a fair job, giving you also a Markdown preview in the sidebar. It also runs on Linux, Mac OS X and Windows.
To use it, install geany, then install the package geany-plugin-markdown and select it from the plugin manager.
I just coded up an offline markdown viewer using the node.js file watcher and socket.io, so you point your browser at localhost and run ./markdownviewer /path/to/README.md and it streams it to the browser using websockets.
markdownviewer https://github.com/Hainish/markdownviewer/
There is also StackEdit. It will work both online and offline (it uses your browser local storage).
You can also connect it with Dropbox or Google Drive to see files hosted on the cloud.
If you're a vim person, you can try the vim-preview plugin. Simply install it into your ~/.vim directory with your method of choice. Then you can open a Markdown file with vim and use the command :Preview which will open a new window in your browser and display the end result.
Consider Strapdown.
Strapdown is Javascript-based solution that renders the markdown content in the browser, which makes it great for offline-viewing.
From their own description:
Strapdown.js makes it embarrassingly simple to create elegant Markdown documents. No server-side compilation required.
So rename your .md markdown file to .html, and surround it with:
<xmp theme="united" style="display:none;">
# Markdown content here
…
</xmp>
<script src="http://strapdownjs.com/v/0.2/strapdown.js"></script>
and opening in any browser will show rendered HTML. Added bonus: you can easily change the theme.
One of the simplest resources that works well on MacOSX is the Markdown Quick Look plugin found at InkMark. After installing this on OS X 10.9+, you simply select a markdown file in Finder and tap the space bar. I am not certain if the results are correlated 100% with Github but they are pretty good and make for a tiny unobtrusive offline viewer only solution. Mashable also wrote an article on 78 different tools if you'd like other options.
For MAC I use Marked, for Windows I use Muto-Mark. Both support the GH stylesheet.
An easy solution for most situations: copy/paste the markdown into a viewer in the "cloud." Here are two choices:
Dillinger.io
Dingus
Nothing to install! Cross platform! Cross browser! Always available!
Disadvantages: could be hassle for large files, standard cloud application security issues.
For OS X, Mou is very nice, and it comes with two GitHub CSS themes.
Check out Haroopad. This is a really nice #markdown editor. It is free and available for multiple platforms. I've tried it on Mac OSX.
You can use extension called Markdown Syntax Highlighting for Notepad++. It is available on Github
After installation, new option in the Language dropdown will be appeared
From now I use http://marxi.co/. Marxi.co has online and offline version.
I frequently want portable applications. For this, I found
http://cloose.github.io/CuteMarkEd/ (I have just tried it briefly, and it seems to work fine).
http://markdownpad.com/faq.html#portable
RStudio can handle markdown files and convert them into html and pdf. If you already have it, you can use RStudio (it is an IDE for R programming language). It is free and open source, and works on Windows, Mac and Linux.
Remarkable, certainly a great tool.
Note: Not available for Mac
Features:
Live preview
It's free.
Extremely lightweight
Export to HTML, PDF
Download: https://remarkableapp.github.io/
Edit 2022
I use and love Mark Text now. (https://marktext.app)
You may use Scribefire Next.
It's a Mozilla Firefox browser plugin. Just install the extension and fire up Firefox. Customize your toolbar and place the Scribefire shortcut to it. And since it's a browser plugin, you can use it in Mac, Linux and Windows.
When you want to write in Markdown mode, just click Edit Code from the Scribefire window.
Now to meet your purpose, go to Edit Code mode and copy all the texts and paste it to your .md file and upload.
There is no live preview feature for this, you have to toggle Edit Code and Edit Visually to preview your text.
I'm using it in my Linux Mint box:
Update:
It's year 2014, need to add some other awesome tool here for other readers and researchers. Just recently used Brackets + Markdown Preview Extension.