I'm trying to find a script, app, or even a language that would allow me to simplify text entry. I want to take a list of values that I need to enter (delimited by line breaks, pipes, anything), bulk load them into an array (similar to individual items in Office's Clipboard feature), and use a single key/combination to paste the items sequentially wherever I have my cursor.
A simple example would be if I took the following string, "1|2|3|4|5", loaded it into the script, place my cursor where I want to paste, hit a key to paste the first item, move my cursor, hit a key to paste the second item, etc.
Related
I think no one ever asked this question.
Say you want to select just the the variables after the import word on each line(settings, filters, user, countries, favorites) in this text:
import settings from './settings';
import filters from './filters';
import user from './user';
import countries from './countries';
import favorites from './favorites';
I tried to put my cursor at the beginning of the settings word, press C-V4jE but not success. I also tried to apply REGEX after entering in VISUAL BLOCK mode, something
like /\w\s but yields the same result(a fixed column length block of text):
settings
filters f
user from
countries
favorites
The result I'm expecting to do on Vim is this:
settings
filters
user
countries
favorites
I think I saw this feature on VS Code but after MULTIPLE searches I found 0 results about this solution on Google, everyone shows only how to select fixed column length texts OR just saying to use $ which applies only for texts that you want to select to the end of the line.
Does anyone knows? Thanks!
It's visual-block mode: what you select is the whole block, not some arbitrary subset or superset of it.
"Visually selecting" multiple non-contiguous pieces of text of arbitrary length is not something that can be done with built-in means so you can either try some kind of "multi cursor" plugin or approach your problem differently…
For example, if you want to wrap those words in braces because they are no longer default exports, you can do something like this:
:'{,'}norm wciw{ <C-v><C-r>" }<CR>
Where the normal mode command wciw{ <C-v><C-r>" }:
move the cursor to next word with w,
change inner word with ciw,
insert { ,
insert content of unnamed register with <C-r>" (<C-v> is used to insert a literal ^R),
insert },
is executed on each line in range '{,'}, representing the current paragraph.
Or, as per your comment, if you want to yank those words for later use, you could do something like:
qaq
:'{,'}norm w"Ayiwh"Ayiw
Where register a is cleared with qaq and the normal mode command w"Ayiwh"Ayiw:
move the cursor to next word with w,
append it to register a with "Ayiw,
move the cursor to the preceding space with h,
append it to register a with "Ayiw,
is executed on each line in range '{,'}, representing the current paragraph.
Those things come naturally over time.
If you want to copy
these words, you could apply some normal mode commands to all lines (or to a
visual range) with:
:%norm 0WywG[p
to grab the 2nd word and paste each one at the end of the file and do what you
like with them:
import settings from './settings';
import filters from './filters';
import user from './user';
import countries from './countries';
import favorites from './favorites';
settings
filters
user
countries
favorites
filters
Or you could make a copy of the lines, visually select them and
do:
:'<,'>norm dwwd$
to delete the first word, jump to the 3rd and delete the rest of the line,
leaving just those words you are trying to select visually in your question:
settings
filters
user
countries
favorites
filters
I have a Word doc in which I'm inserting links to an Excel file. For single Excel cells I can use Paste Special>Paste Link>Unformatted Text to link to just the cell contents. However, sometimes I want to link multiple cells laid out as a table in Word.
If I copy the cell range I want and then use Paste>Link & Use Destination Styles or Paste>Link & Keep Source Formatting, a line break gets inserted above the table, which I do not want but can't get rid of as it's part of the linked field. If I use the unformatted text option, I lose the basic table layout. None of the Paste Special options seem to work for this.
The only workaround I can think of is to link as unformatted text each cell in the table individually, but with sometimes hundreds of cells, that's not really an option. Help! What can I do?
(One reason I am having trouble with the line break above is that I'm trying to use Insert Caption with the tables thus linked, but when I do, the resultant caption gets incorporated into the linked field, and so when I update fields, the caption disappears since it's not in Excel... workarounds for that would help too.)
I am using Microsoft Office Professional Plus 2016.
[EDIT: Example here!]
Word doc:
Linked Excel sheet (Cells A1:C3):
If I highlight some or all of the table and Update Link, the caption disappears:
And when my cursor is at the line break above the table, the table fields highlight as that line break is somehow considered part of the linked field:
I think you just need to add a space before the line break to make sure the caption is not within the linked field. Look at difference between the two example below:
Cursor is now placed just before the line break. The values are highlighted, indicating that the linked field is selected:
Now there's a space between the cursor and the line break. The values are not highlighted, so you can safely insert a captino here:
I use DBISQL on Win32 on 12.0.1.3769.
Usually, I am interested in copying cell content from the Result pane of DBISQL, not the contents of the complete row or the row headers.
I can do this by using the context menu and choose "copy data / cell" (I use a localised version, the English words may be different). But I would certainly like to use CTRL-C to copy only the contents of selected cells. As stated, however, CTRL-C copies the full row(s) including the header of the column. And all too often I try to insert a single number in a particular window, then insert an entire database unintentionally instead...
Question: Can I use another shortcut or is there a choice in the result pane to change the meaning of CTRL-C?
It looks like Ctrl-C maps to Copy Data Rows effectively, while you (and I!!!) would like to MALL map it to Copy Data-Columns, as defined here: copying columns, rows and cells in an Interactive SQL result collection.
The complete list of Interactive SQL Keyboard Shortcuts dates back to 1985... However, even then, cool children's software allows you to change the key tasks (hint, hint:)
Thank you, Volker, for noting how Really Annoying Ctrl-C is [ end sarcasm alert ] ... [ sarcasm alert ] Until now it had been only one of the little irritants of your life such as an alarm that went away before you finished sleeping.
I am trying to create an Excel VBA that would delete only a specific part of the cell in only one column.
In Column A, I have a directory values:
For example:
Directoryof K:\data\Admin\
What I would like to do is remove the "Directoryof" from all the cells in column A and leave only the remaining text that follows it.
To create a macro to perform the above follow the below steps:
Click the "Developer" tab on the top menu.
You will find an option "Record Macro".
Click the Record Macro ->
a. A dialog box appears, give your macro a name
b. Shortcut key (if you want) can give by pressing (shift and any key such as
letters)
c. Store macro in : This workbook (this allows your macro to run on this sheet).
Click on "Use Relative References".
Once you are done, just perform the delete operation ( by removing the portion you do not want) on one of the column so that the macro may record the process which you are performing.
Once done, below at the lowest pane you will find Stop Macro option (a small blue square box). Click it to stop the recording of the macro.
Now you are ready with a macro to replicate the same without you performing the operation.
Just goto any other column where you want to perform the operation and click on "Macro" option on the developer tab and then click on your created marco, and you will see the magic happen.
You could probably use regex to accomplish what you are going for. Regular Expressions are often used for finding patterns. If all of your follows the same format, you could break your strings apart into two capture groups with something like:
(.+)([A-Z]:\\.+)
https://regex101.com/r/uD4uJ0/2 <-- this will show you your capture groups
Edit: I updated this link, sorry, originally had the wrong one.
This here How to use Regular Expressions (Regex) in Microsoft Excel both in-cell and loops will show you how to split up capture groups if you are interested.
You could use something like text to columns, fixed width, and split the columns after Directoryof and then copy/paste the values back into column A.
I'm not sure if there's a method to do this without a helper column without VBA. If you can afford to use a second column, you can also use =LEFT(Cell, # of characters) assuming that the part you want to strip off is always "Directoryof" and then copy/paste values back into column A.
I have some data of form
[39645961,-79966658]358920045121212[0.75]2013-01-30 20:47:52
[39646124,-79966771]358920045121212[0.5]2013-01-30 20:47:54
[39646134,-79966733]358920045121212[0.5]2013-01-30 20:47:56
[39646123,-79966723]358920045121212[0.5]2013-01-30 20:47:58
[39646144,-79966724]358920045121212[0.5]2013-01-30 20:48:09
......
How can I import them into an excel file into separate columns. like
39645961 -79966658 358920045121212 0.75 2013-01-30 20:47:52
39646124 -79966771 358920045121212 0.5 2013-01-30 20:47:54
39646134 -79966733 358920045121212 0.5 2013-01-30 20:47:5
Any ideas?
If it's not too frequent task:
Copy-paste the text to Excel (will occupy one column)
Data - Text to Columns (Excel 2003)
Delimiters: Comma and Other: ]
After completing the operations, insert a column after the remaining non-splitted fragment (358920045121212[0.75) and repeat Text to Columns for this column only with Other delimiter as [.
1) Copy the data into a text file, like Notepad.
2) Use find and replace to replace bracket characters with a tab character.
You can not directly type a tab character into the replace field, because it will just move your cursor to the next field. To get around this:
Open another Notepad window and press tab, then copy the tab into the replace field of the original Notepad window. Hit replace and repeat this process with space and comma characters.
3) Save and close the notepad file.
4) Open the notepad file in Excel. (choose file, open, and don't forget to change the file type in the open dialog from "All Excel Files" to "All Files"
5) This will open the Text Import Wizard. Hit next, next and finished, and the data should show up in separate columns
If you want to do it strictly in Excel, you will have to extract the individual data elements from each string using a combination of text functions, including SEARCH or FIND, LEFT, MID and RIGHT. The following formulas show one wqy to extract each element from one of the strings, which I have assumed is in A1.
=MID(A1,2,SEARCH(",",A1)-2)
=MID(A1,SEARCH(",",A1)+1,SEARCH("]",A1)-SEARCH(",",A1)-1)
=MID(A1,SEARCH("]",A1)+1,SEARCH("]",A1)+SEARCH("[",MID(A1,SEARCH("]",A1),99))-SEARCH("]",A1)-2)
=MID(A1,SEARCH("[",A1,2)+1,SEARCH("]",MID(A1,SEARCH("[",A1,2)+1,99))-1)
=MID(A1,SEARCH("????-??-??",A1),10)
=RIGHT(A1,8)
You would enter these formulas horizontally to the right of A1, then copy them down.
There is a much simpler way - use a third party piece of software.
The one I used costs me very little for the year, but means i don't need to mess around with trying to get it right.
Its the only tool i found which isn't a monthly subscription as well.
Its a desktop based application.
https://onpage.rocks/product/server-log-tool/