EzDevInfo.com

editing interview questions

Top editing frequently asked interview questions

Use vim to edit ANY text on Linux

I come from the Mac world, where I use http://www.hogbaysoftware.com/products/quickcursor to edit text from anywhere in Vim.

Is there anything like that on Linux ? I'm already using "It's All Text" in Firefox, but I'm looking for something broader.

Also, I've looked at this thread, but it's only solutions for software X, and software Y. Any idea ?


Source: (StackOverflow)

vim: How can I yank multiple lines into a register?

I want to yank multiple lines in a single register in vim, to easily paste different text templates in a document.

For example, "iyy yanks only the the current line, if I try to select multiple lines in visual-mode, it isn't written into the register.

Any suggestions?


Source: (StackOverflow)

Advertisements

How to comment a block of code in Emacs?

In Emacs, how to comment a block of text, i.e. how to indent a block of text rightward by n whitespace characters and put a chosen character sequence, say ##, at the beginning of each line?

Original

foo
bar foobar
   foo bar

Desired:

# foo
# bar foobar
#    foo bar
  • I need a method that doesn't interfere with CUA mode.
  • comment-dwin doesn't allow me to choose arbitrary character sequence.

Source: (StackOverflow)

How do I make all file types open in the internal editor in eclipse?

When using the open file dialog on Eclipse, many file types open in the internal editor as expected (.java, .txt). However, others open in an external editor. For example on my system attempting to open .sh file causes it to open it in emacs, and .py files open in bluefish.

How do I tell eclipse to open all files in the internal editor. I don't want to make an association for each type explicitly; I just want everything to open in the internal editor by default.


Source: (StackOverflow)

In Emacs, how to reformat an edited paragraph so the line breaks are properly reinserted?

In Emacs, I have a paragraph of text, which is already properly wrapped at, say 79th column on each row, then you edit it, adding some text on some of the rows, how to reformat the edited paragraph so the line break characters are automatically removed and inserted in correct places such that the resultant paragraph are again line breaking at 79th column for each row, or whatever is proper for the current mode, say python-mode?


Source: (StackOverflow)

How can I edit a file if there is no vi, vim, joe, etc?

Is there a way to edit a file if there are no vi, vim, joe, mcedit? In another words is there a way to edit a file using just the shell commands?


Source: (StackOverflow)

Remove Master Boot Code but leave Partition Table?

For testing purposes, I need to fidget with the MBR on a Windows7 test host: I'd like to remove the Master Boot Code but leave the Partition Table within.

Does the following Linux command do this, or does it wipe out the entire MBR, including the Partition Table?

dd if=/dev/zero of=/dev/hda bs=512 count=1

Thank you.


Source: (StackOverflow)

How can I indent multiple lines, and indent "backwards", in gvim?

I'm just learning vim (via gvim, I used to be a Notepad++ user) and haven't yet found how to do 2 things:

  1. How can I indent a set of rows x spaces/tabs right? In Notepad++, for example, I just highlight the rows I need and press 'Tab' key.
  2. Also, is there a way to move backwards equivalent to "Shift+Tab" in Notepad++?

Thanks


Source: (StackOverflow)

OpenOfficeOrg Calc: enter data into all selected cells?

I want to enter the same data (e.g. "superuser") into multiple cells in OpenOffice.Org Calc (version 3.3.0). In order to do so, I select all the cells I want the data to be entered in. However, only the cell selected last (i.e. when releasing the LMB for group selection) gets the value entered subsequently.


Source: (StackOverflow)

In Notepad++, how do I split long lines in several rows?

I usually use Notepad++ for programming, but recently I started doing some writing in it as well.

Writing usually involves long paragraphs with no line breaks, and currently those are displayed in one row, which is extremely inconvenient.

How can I get N++ to to split lines? I believe that the option is called "split lines" in Gedit.


Source: (StackOverflow)

Looking for a good simple free/open source photo editor? [duplicate]

Possible Duplicate:
Looking for a good free image editor

I need a program that can do the following:

Open up an image either JPG or GIF. Resize the image (constraining proportions, and optimize for web.

This is all. Anyone know a good free program that can do this?

Thanks


Source: (StackOverflow)

Delete a line in Visual Studio without copying it?

There is the shortcut Shift+Del to delete a line, but I want to delete the line without modifying what is in the clipboard.

Is there some way to configure it or another shortcut?


Source: (StackOverflow)

Save UTF-8 without BOM Visual Studio 2012

It seems that Visual Studio 2012 hates UTF-8 without BOM and always adds it, resulting in an empty line in PHP pages.

How can I change the encoding to UTF-8 without BOM (or at least to Unicode...)


Source: (StackOverflow)

Resizing pages in Adobe Acrobat Pro

I am using Acrobat Professional 8 to assemble a document from two imported page images (JPGs). Acrobat seems to interpret the images at screen resolution, and creates a document that's about 35" by 46" instead of 8.5" x 11". How can I scale down the page size within Acrobat?


Source: (StackOverflow)

Tool like Media File Segmenter for Linux

I'm looking for a tool for Linux which can segment a video file into multiple small .ts files.

I know one for Mac OS X called Media File Segmenter which is a simple command line tool - I'm looking for an equivalent tool for Linux.


Source: (StackOverflow)