SublimeLinter-contrib-remark-lint - sublimetext

I am trying to get remark-lint working in Sublime Text using SublimeLinter-contrib-remark-lint.
From Sublime Text console I keep getting WARNING: remarklint cannot locate 'remark'.
How could I go about this?

Related

vim filetype plugin conflict with session

Problem
When I restore from a session, It'll be impossible for to load my filetype plugin.
For example, I have an arduino filetype plugin of ~/.vim/ftplugin/arduino.vim, and the content is like this.
SyntasticToggleMode
call feedkeys("\<CR>")
nnoremap <leader>s :w<cr>:ArduinoVerify<cr>
nnoremap M :ArduinoUpload<cr>
I create an arduino file named test.ino to do some coding.
Every thing seems pretty smooth.
The filetype plugin is loaded properly.
Then I close vim with the following commands.
:mksession!
:wviminfo viminfo
:qa
Now there is a session file named Session.vim.
Then I open vim again, and it automatically load the session because I have something like this in my .vimrc.
filetype indent plugin on
if filereadable("Session.vim")
source Session.vim
endif
if filereadable("viminfo")
rviminfo viminfo
endif
Now something went wrong, the key mapping in my arduino filetype plugin is not working.
Also it prints some error message like this.
Error detected while processing /home/lotp/.vim/ftplugin/arduino.vim:
line 1:
E492: Not an editor command: SyntasticToggleMode"sketch_dec06a.ino" "sketch_dec06a.ino" 12L, 150C
E492: Not an editor command: SyntasticToggleMode
IndeedSyntasticToggleMode is a valid vim command belonging to a vim plugin named syntastic.
Question
Is there a solution to solve this problem?
By this I mean using the session and filetype plugin feather simultaneously.
A partial answer:
The plugins are not loaded directly in .vimrc if you use a plugin manager. Their paths are just appended to 'runtimepath', and they are sourced later in the initialisation process.
You can try to add (i.e. in .vimrc) your own custom path to runtimepath, AFTER the end of the plugin initialisation. (i.e., for Vundle, after this line: call vundle#end()) Then add a vim file in your_custom_path/plugin where you put your code to source the session file.
I didn't check all the infos I gave, so sorry for mistakes, but hope it gives you some ideas.
See :h startup, :h 'runtimepath'
Finally I work around this problem by using an vim plugin.
That's somekind of improved version of the built in vim session system
It's called vim-session

Atom.io: Change default syntax highlighting

I want my Atom.io opens "template.cshtml" files as html files.
I installed package "file-types"
and add to my config.cson as:
http://screencast.com/t/ABSsERh3gj52
But I see my templates.cshtml as early.
Please help me with config.cson
Have you checked out language-cshtml, it's an atom package meant directly at cshtml files which adds styntax highlighting.

Make Geany recognize additional file extensions

My default Geany installation on Debian does not recognize some file types out of the box. How can I add extensions, using the same syntax highlighting as other known extensions for simplicity's sake?
In the current case, I'd like Geany to open all .aspx files with the same highlighting as .html files.
Use inside the menu Tools->Configuration files->filetype_extensions.conf. This will allow you to configure the filetypes based on suffix for your user.
Just add new extensions in /usr/local/share/geany/filetype_extensions.conf
I had trouble accomplishing this without help from here.
Go here to read documentation about this topic.
From the Geany menu, go to:
Tools > Configuration Files > filetype_extensions.conf
Go to this line and un-comment it:
#~ [Extensions]
So that it just reads:
[Extensions]
I was needing to add .mjs as an additional extension for javascript. So, for me, I also uncommented this line:
#~ Javascript=*.js;
And changed it to:
Javascript=*.js;*.mjs;
After this, I saved the file.
Now when I opened files having a .mjs file extension, they automatically have Javascript Syntax Highlighting.
I made some suggestions to improve this expeirience here.

How do I enable syntax highlighting for my Gemfile in Sublime Text 2?

I recently started using Sublime Text 2. What an awesome editor. It does a great job of highlighting Ruby code, but it does not highlight my Gemfile.
Is there a way to get it to do that?
I found this Gist but it has no instructions on how to use it.
There are at least three options:
Switch syntax manually (not preferred, but easy; no explanation required)
Add "Gemfile" to the list of Ruby-syntax files
Use the plugin you link to and create a package for it
1. No explanation, but handy trick
You can bind a keystroke to set syntax without moving to the mouse.
I bound syntax changing to Ctrl-Opt-Space by adding the following to my user keybindings:
[
{ "keys": ["ctrl+alt+space"],
"command": "show_overlay",
"args": { "overlay": "command_palette", "text": "Set Syntax: " } }
]
2. Add "Gemfile" to list of Ruby-syntax files
Linux: ~/.config/sublime-text-2/Packages/Ruby/Ruby.tmLanguage
OS X: ~/Library/Application Support/Sublime Text 2/Packages/Ruby/Ruby.tmLanguage
Windows: %APPDATA%/Sublime Text 2/Packages/Ruby/Ruby.tmLanguage
You can also get there by using the menu option Preferences -> Browse Packages and going into the Ruby package. Once you're in the file it'll be obvious: it's the <array> element with Ruby-looking filenames. Add <string>Gemfile</string> and you're all set.
It's possible the setting could get overwritten on an upgrade; I'm not sure how that works with ST2–it may be cleaner to do it through code as in the snippet.
3. Using the snippet you linked to
More work (and the correction of one syntax error). You can either do it manually, by creating a directory in Packages (see above for location) or create an actual package and allow ST2 to install it.
I created a test package called "Syntax" and copied the snippet into it, restarted ST2, and opening a Gemfile worked as expected. The correction required an additional colon (new gist), nutshell:
elif name[-3] == "erb": # Needed a semi-colon here.
set_sintax(view, "HTML (Rails)", "Rails")
If you are here but are using Sublime Text 3 you might not be able able to find the 'list of Ruby-syntax files' in packages.
Most other solutions found online were confusing to me.
I fixed this by manually changing Gemfile to Ruby in the bottom right hand corner file extension menu item when you have opened the file in Sublime Text 3 (which is what I had been doing each time I opened the file up until now).
Once you have selected ruby then go to Preferences -> Settings-More -> Syntax Specific-User
{
"extensions":
[
"Gemfile",
"Gemfile.lock"
]
}
When you navigate to Syntax Specific User it opens a file specific to the language that the file has syntax highlighting for. You may need to change the file back to whatever it is defaulting too (mine was 'Rd (R Documentation).sublime-settings') and removing Gemfile from that Syntax highlighting file.
In Ubuntu these files are stored at
~/.config/sublime-text-3/Packages/User
The DetectSyntax plugin for ST2 provides a more comprehensive solution to highlighting files - It allows file highlighting based on rules. It's smart enough to understand the difference between a Rails file, other files that use .rb as an extension and standard ruby files.
The standard rules include Gemfile, Rakefile, Guardfile and others matched to Ruby for Syntax formatting.
See DetectSyntax on GitHub.
You can achieve this by copying the HTML.tmLanguage file in the User/ folder, this way it won't be overwritten by an update.

Syntax highlighting in gedit not working automatically

I'm trying to use Ubuntu for Rails development and I'm liking gedit except the syntax highlighting does not seem to work with out me setting it for each file I open. Should it not recognize a .rb file a ruby file rather than me having to go into the menu and setting it as such?
Have I missed a setting somewhere?
Try to edit your /etc/mime.types file and add those “text/x-????” entries:
text/x-ruby-source rhtml html.erb erb
text/x-eruby rjs
text/x-yaml yml yaml
Try opening up /usr/share/gtksourceview-2.0/language-specs/ruby.lang again and addding this line at the top of the section:
<property name="mimetypes=">application/x-ruby</property>
If that doesn't work, I'm stumped.
Syntax highlighting pulls its settings from XML lang files, although the Ruby lang file should automatically pick up on .rb files. To check, open the language file from /usr/share/gtksourceview-2.0/language-specs/ruby.lang and see if *.rb is mentioned.
<property name="globs">*.rb</property>
Adding more Ruby extensions to the lang files:
http://blog.adsdevshop.com/2008/04/19/erb-syntax-highlighting-in-gedit/

Resources