How to prevent Sublime Text 2 from swallowing closing brackets, quotes and parentheses?

Sublime has this behaviour which is really annoying sometimes when you have to type in constructions with lots of brackets. When you type ( it adds () and puts the cursor in the middle, all fine, if you however will type ) it will silently swallow the closing bracket. This is really annoying when typing … Read more

Crop a Bitmap image

How can i crop a bitmap image? this is my question i have tried some concepts using intents but still fail.. I am having a bitmap image which i want to crop!! here is the code : Intent intent = new Intent(“com.android.camera.action.CROP”); intent.setClassName(“com.android.camera”, “com.android.camera.CropImage”); File file = new File(filePath); Uri uri = Uri.fromFile(file); intent.setData(uri); intent.putExtra(“crop”, … Read more

More efficient movements editing python files in vim

Given a python file with the following repeated endlessly: def myFunction(a, b, c): if a: print b elif c: print ‘hello’ I’d like to move around and edit this file using familiar vim movements. For instance, using (, ), [[, ]], {, } or deleting/yanking/changing text using commands like di}. In other languages (like C++, … Read more

Delete from the current cursor position to a given line number in vi editor

How do I delete a block of text from the current cursor row to a given line number in vi? For example: 49 <j:set var=”changeSet” value=”${build.changeSet}” /> <—– delete from here (cursor position) 50 <j:if test=”${changeSet!=null}”> 51 <j:set var=”hadChanges” value=”false” /> 52 <TABLE width=”100%”> 53 <TR><TD class=”bg1″ colspan=”2″><B>CHANGES</B></TD></TR> 54 <j:forEach var=”cs” items=”${changeSet.logs}” varStatus=”loop”> 55 <j:set … Read more

How do I duplicate a whole line in Emacs?

I saw this same question for VIM and it has been something that I myself wanted to know how to do for Emacs. In ReSharper I use CTRL-D for this action. What is the least number of commands to perform this in Emacs? Answer I use C-a C-SPACE C-n M-w C-y which breaks down to … Read more