取代我在一个文件中的以下行我编辑在VSCode:查找和Visual Studio代码
...............111.........111.............111..
我想0
s到全部更换.
秒。然而,当我强调这一行,做一个查找/替换为.
S,所有的.
S上的文件被替换,而不仅仅是我有选择,行的人,甚至当我在切换选择“查找“按钮。这是一个错误?在其他编辑器中,如果我选择了一段文本然后执行查找/替换,它将只会查找/替换所选块中的匹配项。
下面是你应该能够重现该问题有一个片段。 ...............111.........111.............111..
行位于test_unicode
函数内。
def test_simple2(self):
"""Simple CSV transduction test with empty fields, more complex idx, different pack_size.
100011000001000 ->
..........111....................111..........11111..........111..
"""
field_width_stream = pablo.BitStream(int('1000110001000001000', 2))
idx_marker_stream = pablo.BitStream(int('11101', 2))
pack_size = 4
target_format = TransductionTarget.JSON
csv_column_names = ["col1", "col2", "col3", "col4", "col5"]
pdep_marker_stream = pablo.BitStream(generate_pdep_stream(field_width_stream,
idx_marker_stream,
pack_size, target_format,
csv_column_names))
self.assertEqual(pdep_marker_stream.value, 63050402300395548)
def test_unicode(self):
"""Non-ascii column names.
Using UTF8. Hard coded SON boilerplate byte size should remain the same, column name
boilerplate bytes should expand.
100010010000000 ->
2 + 4 + 9 2 + 4 + 6 2 + 4 + 7
...............111.........111.............111..
"""
field_width_stream = pablo.BitStream(int('100010001000', 2))
idx_marker_stream = pablo.BitStream(1)
pack_size = 64
target_format = TransductionTarget.JSON
csv_column_names = ["한국어", "中文", "English"]
pdep_marker_stream = pablo.BitStream(generate_pdep_stream(field_width_stream,
idx_marker_stream,
pack_size, target_format,
csv_column_names))
self.assertEqual(pdep_marker_stream.value, 1879277596)
我在Ubuntu 16.04使用VSCode 1.12.2。
我可以在这种情况下,正则表达式做到这一点,但它似乎是大材小用。在一般情况下,我认为一个更直接的查找/替换工具会很有用。我可能会在他们的git hub页面上打开一个问题。 – Adam
打开这个问题是个好主意。令我惊讶的是,VSCode和Sublime让你跳过这些直接的任务。例如,你不能在我的答案中反转上面的第3项和第4项 - 这看起来很容易出错和沮丧。 – Mark
问题已打开:https://github.com/Microsoft/vscode/issues/27083。如果他们解决问题,他们会发布一个答案。 – Adam