Tech C**P
15 subscribers
161 photos
9 videos
59 files
304 links
مدرس و برنامه نویس پایتون و لینوکس @alirezastack
Download Telegram
http://pygments.org/

This is a syntax highlighter that creates permanent link for your code in a variety of languages including python in the provided link.

#python #pip #syntax_highlighter #highlighter #pygments
Did you know you can syntax highlight your codes in google docs using an add on?

This is code block! An addon that adds syntax highlighting to your documents. In order to download it, go to Add-ons menu in google docs and click on Get add-ons. Search for code block and install it.

After installation Code Block option will be added to Add-ons menu. Click it and hit Start. Now you will have a great syntax highlighting right in your toolbox. :)

Happy syntax highlighting! :D

#google #code #syntax_highlight #code_block #addon #google_doc
Have you ever wanted to syntax highlight text area with specific content in it? Let's say it contains json data. We also need to have
code folding (+/- in front of objects to collapse them). The tool that can be used for this purpose is codeMirror:
- https://codemirror.net/index.html

One of the things that I want to note here is that textarea wont get updated when you enter data in codeMirror field. For that you need to call save() method of codeMirror like below:

var myEditor = CodeMirror.fromTextArea(page_content, {
lineNumbers: true,
mode: "markdown",
lineWrapping: true,
lineNumbers:false,
indentWithTabs: true
});

function updateTextArea() {
myEditor.save();
}
myEditor.on('change', updateTextArea);


Download all the demos from github:
- https://github.com/codemirror/codemirror


Instead of myEditor change you can update textarea on form submit.

#syntax_highlighting #syntax #codeMirror #code_folding
If your pyCharm does not recognize specific python files as a Python file and does not provide syntax highlighting for you, you need to navigate to File > Settings > Editor > File Types > Text and Under Registered Patterns, you can see the new myfilename.py in the list. Remove it from the list with the - button and click OK at the end.

#python #pycharm #file_types #syntax_highlighting