How to make Emacs highlighting part of lines that go over 80 chars? I use the whitespace mode: ;; `lines-tail`, highlight the part that goes beyond the ;; limit of `whitespace-line-column` (require ‘whitespace) (setq whitespace-style ‘(face empty tabs lines-tail trailing)) (global-whitespace-mode t) More: https://github.com/zma/emacs-config/blob/master/.emacs Alternatively, you can run highlight-lines-matching-regexp with the expression .{81}. http://stackoverflow.com/questions/6344474/how-can-i-make-emacs-highlight-lines-that-go-over-80-chars
Tag: Editor
How to convert between dos and unix file coding in Emacs?
Posted onHow to convert between dos and unix file coding for files in Emacs? From Dos to Unix coding: M-x set-buffer-file-coding-system RET undecided-unix or C-x RET f undecided-unix Then save the file (C-x C-s). From Unix to Dos M-x set-buffer-file-coding-system RET undecided-dos or C-x RET f undecided-dos Then save the file (C-x C-s).
Replacing tabs with spaces in Emacs
Posted onHow to replace tabs with spaces in Emacs? You can first select the regions of text for converting/replacing, then run M-x untabify to replace all tabs with appropriate number of spaces. There is also a M-x tabify for replacing sequences of spaces to tabs. There are also commands to convert tabs to spaces or vice
Read more
How to print the name of the current file being edited in Emacs?
Posted onIn Emacs, how to print the name of the current file that I am editing? The built-in function buffer-file-name gives the full path of your file. To get the file name: M-: buffer-file-name
How to change the default text editor on Linux
Posted onOn Linux, a default editor is used for text editing such as crontab -e or git commit. How to change it to the editor of my own choice? The default editor is indicated by the EDITOR environment variable. You can set this environment variable to set the default editor. For example, set it to emacs
Read more
How to allow contributors to Upload Files in wordpress
Posted onHow to allow contributors to Upload Files in wordpress? I allow my wordpress site’s contributors to submit posts. But by default, WordPress contributors do not have the capability to upload files. How to allow them to upload files? The key to my solution to add the upload files capability to contributors in WordPress is the
Read more
How to change the window title font family and size in Gnome 3?
Posted onIt was ever possible to set it in gnome-teak-tool. However, in the latest Gnome 3, it disappears. Is there any other way to set it? The configuration is the org.gnome.desktop.wm.preferences titlebar-font under dconf. You can use dconf-editor to find the appropriate key entry and set it. Or use gsettings: $ gsettings set org.gnome.desktop.wm.preferences titlebar-font ‘Sans
Read more
Installing WordPress in a sub directory while working for the whole site
Posted onHow to install WordPress in a sub directory while working for the whole site? Putting the WordPress files in the root directory seems messy. A method is introduced here: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory The process to move WordPress into its own directory is as follows: Create the new location for the core WordPress files to be stored (we
Read more
How to save PuTTY profiles/sessions?
Posted onPuTTY is a great SSH client on Windows. However, how to save it’s profiles/sessions that I saved so that I can migrate my settings from one machine to another? PuTTY saves its settings in the registry of Windows. You can find it in the registry editor by run regedit under: HKEY_CURRENT_USERSoftwareSimonTatham You can save your
Read more
Sending emails securely
Posted onSending emails securely is needed for certain situations, such as sending my bank account to my wife, giving my account password to my close friend for a while. How to send it? Regarding the recent US PRISM program, it is an important issue. Seeing your solution, a few of my own popped up. Here are
Read more
Online image editor like Photoshop
Posted onIs there any online image editor that has the basic functions of Photoshop. Basic editing of the image should be enough. pixlr is a very good tools for this purpose: http://pixlr.com/ It works great for me.
Where are the backup files of my iPhone by iTune and how to get the real files from them?
Posted onI backup my iPhone with iTune to my local computer. Where can I find out the backup files of my iPhone by iTune? And how to get the real files (like songs, notes, etc.) from the backup files? The location of the backup files from iTune It depends on the computer’s operating system: Mac: ~/Library/Application
Read more
WordPress: How to use Markdown for writing posts
Posted onI like the Markdown editor whick is widely used (e.g. This site) and very convenient to use. How to add a Markdown editor for WordPress? I tried some plugins and find they have their strengthens and disadvantages. Here are my requirements: Compatible with my existing posts. They should still display well. I can accept minimum
Read more
Set the image size in markdown syntax
Posted onWhen I add an image in editor using the markdown syntax, I want to control the size of the image to display instead of its original size. How should I do this? As far as I know, the syntax of markdown currently does not support setting the size of image. If you want to set
Read more
Adding Custom Buttons to the WordPress HTML Editor
Posted onAs a WordPress user, you may have noticed that the default HTML editor lacks some of the features that you need for your content. Fortunately, you can add custom buttons to the WordPress HTML editor to make your content creation experience more efficient and productive. In this post, we will explore how to add custom
Read more
How to install the MATE fork of Gnome 2 on Fedora 17?
Posted onI miss Gnome 2. How to install the MATE fork of Gnome 2 on Fedora 17? MATE is already included into Fedora 17’s repository and is an official feature of Fedora 18. To install MATE on Fedora 17 # yum install @mate-desktop To install softwares usually needed: # yum install mate-media mate-screensaver mate-system-monitor mate-power-manager mate-utils
Read more
Where Does Evolution Save Its Data and Configuration Files on Linux?
Posted onEvolution is a great personal information management tool that provides Email, address book and calendar tools. Evolution provides many enterprise friendly feature such as native support to Microsoft Exchange connectivity for Emails, address books and calendars. Evolution uses various ways including plain files and dconf configuration systems. This post will give an introduction to the
Read more
Vim Tutorial for Beginners: vimtutor
Posted onThere are many Vim tutorials and Vim tips on the Web. However, I find the vimtutor provides the best tutorial among those so far as I found on the Web while the vimtutor seems usually reachable from a terminal which is not obviously known to Vim beginners who are usually Linux beginners too. This page
Read more
Notes for Beginners of Software Development on Linux
Posted onLinux is a great platform for software development targeting servers or backends. In general, working on Linux is very productive. The problem that beginners on Linux face is the the learning curve is steep at the beginning. But believe me, after you get through the initial green steep learning step as in the figure below
Read more
How to Change the DPI of Images Exported from Slides in PowerPoint
Posted onPowerPoint uses 96 dots per inch (dpi) by default when you export a slide. The DPI of the images like .tif ones exported from PowerPoint are always 96. In the options of PowerPoint, there is a setting for choosing DPIs. However, it have no effect. For some needs like images for printing posters, larger DPIs
Read more