Making a newline in Transifex online editor - transifex

I'm trying to make a newline in the Transifex online editor but I can't figure how this can be done.
When I just press Enter, the editor didn't seems to make a new line like this (sorry, I can't attach images to my post)

When you use the web editor in Transifex keep in mind that the "⏎" character denotes a new line. So when you see it in the source string just go ahead and hit the or key at the same point in the translation. The symbol is not seen but since you press Enter or Return the editor adds the expected newline.
You can check it in Transifex's documentation too.

Related

How can I search for a second pattern in vi without deleting the first search pattern

In vi text editor, let's suppose I want to navigate through all instances of "cheese" in a text file, so I type "/cheese" and press ENTER. I can use n or N to go to the next/previous instances. If I change my mind and I want to search for "cheesecake", pressing "/" will delete "cheese" so I need to type "cheesecake" instead of only typing "cake".
Most graphical text editors will have the capability to save the last search pattern. Emacs also has this capability. I haven't found how to do this in vi.
I know of no way to make it keep the last command on the line when you open it but you are certainly able to press the up arrow and page through previous commands you've issued. So just type /, hit the up arrow key, type "cake".
PS - This doesn't really belong here. Stackoverflow is about programming questions. You might be better off asking this kind of question over at SuperUser.com.

vim - replace mode to replace new lines too

In VIM's replace mode, as you type, you don't add any new content, you just replace what is already there. Only problem is that you can add new content when you press enter. I'd like to know if there is a way so that pressing enter (or ^M) will be interpreted as down arrow when you're in replace mode?
If you must know, I'm working in a file that has segments that are given a fixed number of lines. I can't add new lines because it will offset subsequent segments.
Thanks in advance!
As far as I understand your requirements this can be achieved in the virtual replace mode. You can enter it via gR.
Typing a <NL> still doesn't cause characters later in the file to appear to
move. The rest of the current line will be replaced by the <NL> (that is,
they are deleted), and replacing continues on the next line. A new line is
NOT inserted unless you go past the end of the file.
Please note that vim has to be compiled with +vreplace.

Sublime Text Tab Indentation Indenting Entire Paragraph?

I've recently discovered Sublime Text and since I'm new to using text editors like this, I had a question about indentation. When I'm not using Sublime for code, I type up my writing with it before taking it to a word processor for further processing. I've been having a little bit of trouble with the indentation regarding paragraphs. When I tab a paragraph, it seems to tab the entire paragraph rather than just the first line. It looks like the first paragraph in this picture.
I've tried using the wrap paragraph function which seems to allow me to tab just the first line but when I paste it in Microsoft Word, it retains its wrap setting. Is there anyway that I can just indent just the first line without having to wrap it? Or am I approaching it all wrong?
For a global effect you can add this to Preferences > Settings-User:
"indent_subsequent_lines": false
Because I code too, I add it to Preferences > Settings-More > Syntax Specific-User.
To do this properly, open a .txt file (or your preferred file type) and it will open/create a settings file for the specific file type. Then paste in this and save:
{
"indent_subsequent_lines": false,
"tab_size": 4,
"translate_tabs_to_spaces": false
}
Sublime is a code editor, not a word processor. Although you may use it to type any kind of (plain) text, it's focused on editing code.
Sublime indents lines in a way that makes sense for a programming language. If you're looking for a tool to write anything like a report or a novel, maybe you should consider another tool.

Paste within line in macvim

I started to use macvim not only for code, but also for editing a wiki and academic writing in LaTeX. After several honeymoon moments ;-) and first customization efforts, I found a problem I can't solve:
How do I paste content from the system clipboard within a line, no matter where this content is copied from? (I use LaunchBar’s multi clipboard feature quite excessively and store mostly > 20 strings from different applications I will paste sooner or later. It works well with macvim, but not when it comes to "linewise" content.) p or P create newlines, cmd-v as well.
I neither want to add strings between tags, nor focus on other specialised settings.
I don't know how Launchbar works in this regard but all the clipboard managers I've used send a Cmd-v when you hit Enter.
MacVim, being very well integrated in the system, supports many default Mac OS X shortcuts like Cmd-o, Cmd-s or Cmd-v so… simply selecting the item in Launchbar's list and hitting Enter should work.
If your pasted content ends up on a line of its own (presumably above the current line) instead of in the middle of your sentence that means that the pasted text contains a new line, plain and simple. Because MacVim maps Cmd-v to P, the pasted content is pasted before the cursor: inline if there's no newline in sight, above the current line if there are newlines.
That's normal behavior.
At that point, either you find a way to clean Launchbar's content up before Cmd-v or you edit the pasted text afterward with something like ^v$y"_d<movement>P.
p and P only create new lines if the clipboard contains a newline character.
I just pasted one-line content from my clipboard into vim and it worked fine (in-line).
The issue may be with the way LaunchBar is copying to its clipboards.

In Vim, how to keep characters concealed even when cursor enters that line

I may have a unique situation here. I want gVim (gui version, in Linux) to keep concealed characters concealed no matter what, even when the cursor is on that line or that character gets selected. (It should be as close to if the characters never existed as possible.) Currently the concealed characters show themselves when the cursor enters that line, which causes text to jump around when scrolling and when selecting text.
We are using gView (read-only gVim) to view logs, so as to take advantage of its robust syntax highlighting. Problem is, these logs contain lots of escape characters and TTY color codes, that make reading difficult. (^[33mSomeText^[0m)
I'm using this line to hide them:
syntax match Ignore /\%o33\[[0-9]\{0,5}m/ conceal
Since the files are viewed by non-vim-experts, it looks glitchy and broken when the text un-conceals itself. (And also looks glitchy and broken if the color codes are present, and also looks glitchy and broken if the color codes are blacked-out to become invisible, but still show when selected and appear after copy/paste.)
This should be fine because these files are opened read-only in gview, with an extra set nomodifiable making it even more difficult to save the file. While it's possible to edit and attempt to save the logs, doing so is considered both an invalid thing to do, and a harmless thing to do, and requires enough Vim skills that if someone manages to edit a file they know what they're doing. The problem with being able to edit a line with concealed text does not apply.
If 'conceal' can't be configured to keep hidden text hidden no matter what, an acceptable alternative would be to replace the TTY color codes with whitespace when the file gets opened. But, this has to be done in read-only mode, and we can't have gview throwing up a save dialog on closing the window because the file has been modified by its .vimrc.
Note: I am in full control of the .vim script file sourced when these are read, but cannot control the existence of the TTY color codes or the code that opens the log files in gview. (i.e. I can't pass it through sed or anything like that.) The ideal solution is anything that can transparently nuke the color codes from within a .vimrc, but I'll hear any suggestions. The 'conceal' feature is just my most promising lead.
So, any ideas how to permanently get rid of these on file view without dialogs popping up on close?
:help conceal
When the "conceal" argument is given, the item is marked as concealable.
Whether or not it is actually concealed depends on the value of the
'conceallevel' option. The 'concealcursor' option is used to decide whether
concealable items in the current line are displayed unconcealed to be able to
edit the line.
:help concealcursor
Sets the modes in which text in the cursor line can also be concealed.
When the current mode is listed then concealing happens just like in
other lines.
n Normal mode
v Visual mode
i Insert mode
c Command line editing, for 'incsearch'
'v' applies to all lines in the Visual area, not only the cursor.
A useful value is "nc". This is used in help files. So long as you
are moving around text is concealed, but when starting to insert text
or selecting a Visual area the concealed text is displayed, so that
you can see what you are doing.
Keep in mind that the cursor position is not always where it's
displayed. E.g., when moving vertically it may change column.
Also, :help conceallevel
Determine how text with the "conceal" syntax attribute |:syn-conceal|
is shown:
Value Effect ~
0 Text is shown normally
1 Each block of concealed text is replaced with one
character. If the syntax item does not have a custom
replacement character defined (see |:syn-cchar|) the
character defined in 'listchars' is used (default is a
space).
It is highlighted with the "Conceal" highlight group.
2 Concealed text is completely hidden unless it has a
custom replacement character defined (see
|:syn-cchar|).
3 Concealed text is completely hidden.
Only one command is needed: set concealcursor=n
I might have a better idea—you can pass it through sed (using %!sed) or really do a bunch of other :substitute commands—whatever edits you need to get rid of the color codes.
When you’re done, make sure to set nomodified—this forces vim to think there haven’t been any changes!

Resources